aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-04-08 20:56:33 +0100
committerAaron Patterson <aaron.patterson@gmail.com>2011-04-12 19:46:04 -0700
commit8572ae6671c6ec7c2524f327cee82215896e5648 (patch)
treeb2ba0a04ef502725cee88886319fd8a3c841f404 /activerecord/CHANGELOG
parent5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6 (diff)
downloadrails-8572ae6671c6ec7c2524f327cee82215896e5648.tar.gz
rails-8572ae6671c6ec7c2524f327cee82215896e5648.tar.bz2
rails-8572ae6671c6ec7c2524f327cee82215896e5648.zip
Evaluate default scopes at the last possible moment in order to avoid problems with default scopes getting included into other scopes and then being unable to remove the default part via unscoped.
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 64be577624..6b3d408720 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,16 @@
*Rails 3.1.0 (unreleased)*
+* 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.
+
+ Note that this means that if you are inspecting the internal structure of an
+ ActiveRecord::Relation, it will *not* contain the default scope, though the resulting
+ query will do. You can get a relation containing the default scope by calling
+ ActiveRecord#with_default_scope, though this is not part of the public API.
+
+ [Jon Leighton]
+
* Deprecated support for passing hashes and relations to 'default_scope'. Please create a class
method for your scope instead. For example, change this: