aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-04-17 20:47:52 +0100
committerJon Leighton <j@jonathanleighton.com>2011-04-17 20:47:52 +0100
commit256b363eeecf6d0fb896aabd3fc619e200a5062c (patch)
treec8dfbb127ceb2c13786d5206807e0c54d4ab0131 /activerecord/CHANGELOG
parentd1f10e74caaedbc853d0f875d8e2a2ac16899fa0 (diff)
downloadrails-256b363eeecf6d0fb896aabd3fc619e200a5062c.tar.gz
rails-256b363eeecf6d0fb896aabd3fc619e200a5062c.tar.bz2
rails-256b363eeecf6d0fb896aabd3fc619e200a5062c.zip
Revert "Deprecate defining scopes with a callable (lambda, proc, etc) via the scope class method. Just define a class method yourself instead."
This reverts commit f0e198bfa1e3f9689e0cde1d194a44027fc90b3c. Conflicts: activerecord/test/models/post.rb
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r--activerecord/CHANGELOG18
1 files changed, 0 insertions, 18 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 93eb42a52c..6b3d408720 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,23 +1,5 @@
*Rails 3.1.0 (unreleased)*
-* Passing a proc (or other object that responds to #call) to scope is deprecated. If you need your
- scope to be lazily evaluated, or takes parameters, please define it as a normal class method
- instead. For example, change this:
-
- class Post < ActiveRecord::Base
- scope :unpublished, lambda { where('published_at > ?', Time.now) }
- end
-
- To this:
-
- class Post < ActiveRecord::Base
- def self.unpublished
- where('published_at > ?', Time.now)
- end
- end
-
- [Jon Leighton]
-
* Default scopes are now evaluated at the latest possible moment, to avoid problems where
scopes would be created which would implicitly contain the default scope, which would then
be impossible to get rid of via Model.unscoped.