aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorNeeraj Singh and John Leighton <neerajdotname@gmail.com>2013-03-07 18:35:02 -0500
committerNeeraj Singh <neerajdotname@gmail.com>2013-03-07 18:57:27 -0500
commitcd26b6ae7c1546ef8f38302661bbedf8cb487311 (patch)
treef55b6c7796bebb52d77712eab6b4b554d2c6a109 /activerecord/CHANGELOG.md
parentde4a60c9f468bb5bf4bd38220377cc5ac8385102 (diff)
downloadrails-cd26b6ae7c1546ef8f38302661bbedf8cb487311.tar.gz
rails-cd26b6ae7c1546ef8f38302661bbedf8cb487311.tar.bz2
rails-cd26b6ae7c1546ef8f38302661bbedf8cb487311.zip
Combine scope conditions using AND
Currently Post.active.inactive will result in Post.inactive since the last where clause wins when scopes are merged. This pull request will merge all scopes ( barring defaul scope) using AND. The default scope will be overridden if another scope acts on the same where clause. closes #7365
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 3b140b9ec3..ae5ef5c7d7 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,11 @@
## Rails 4.0.0 (unreleased) ##
+* Previously `Post.active.inactive` used to result in `Post.inactive`
+ since the last where clause used to win while combining scopes.
+ Now all the scopes will be merged using `AND`. Fixes #7365 .
+
+ *Neeraj Singh* and *Jon Leighton*
+
* Expand `#cache_key` to consult all relevant updated timestamps.
Previously only `updated_at` column was checked, now it will