aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-04-18 23:35:22 +0100
committerJon Leighton <j@jonathanleighton.com>2011-04-18 23:35:22 +0100
commit019cd51a3f36ec7631bf1b63c069e62a3b5185d4 (patch)
tree6bdb235ccdd5389b381e129fdeef3582db71175e /activerecord/CHANGELOG
parent6f84c73dc48538202766cff3d973a53d3c30848e (diff)
downloadrails-019cd51a3f36ec7631bf1b63c069e62a3b5185d4.tar.gz
rails-019cd51a3f36ec7631bf1b63c069e62a3b5185d4.tar.bz2
rails-019cd51a3f36ec7631bf1b63c069e62a3b5185d4.zip
Bring back support for passing a callable object to the default_scope macro. You can also just use a block.
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r--activerecord/CHANGELOG11
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 4ae82a6419..9ff29f1155 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,16 @@
*Rails 3.1.0 (unreleased)*
+* default_scope can take a block, lambda, or any other object which responds to `call` for lazy
+ evaluation:
+
+ default_scope { ... }
+ default_scope lambda { ... }
+ default_scope method(:foo)
+
+ This feature was originally implemented by Tim Morgan, but was then removed in favour of
+ defining a 'default_scope' class method, but has now been added back in by Jon Leighton.
+ The relevant lighthouse ticket is #1812.
+
* 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.