diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-04-04 00:07:45 +0100 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-12 19:46:04 -0700 |
commit | 5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6 (patch) | |
tree | e8f0dff39f96658699b66749b4a257ba8ccfda9f /activerecord/CHANGELOG | |
parent | fc9a04b6a69d6821a6f1601e3e0dd518300fa138 (diff) | |
download | rails-5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6.tar.gz rails-5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6.tar.bz2 rails-5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6.zip |
Deprecated support for passing hashes and relations to default_scope, in favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details.
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r-- | activerecord/CHANGELOG | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 88c2562619..64be577624 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,26 @@ *Rails 3.1.0 (unreleased)* +* Deprecated support for passing hashes and relations to 'default_scope'. Please create a class + method for your scope instead. For example, change this: + + class Post < ActiveRecord::Base + default_scope where(:published => true) + end + + To this: + + class Post < ActiveRecord::Base + def self.default_scope + where(:published => true) + end + end + + Rationale: It will make the implementation simpler because we can simply use inheritance to + handle inheritance scenarios, rather than trying to make up our own rules about what should + happen when you call default_scope multiple times or in subclasses. + + [Jon Leighton] + * PostgreSQL adapter only supports PostgreSQL version 8.2 and higher. * ConnectionManagement middleware is changed to clean up the connection pool |