aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2013-03-03 19:47:48 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2013-03-03 19:47:48 -0800
commit1909808171d8bd9e8dcff0dfd652f05557ce6194 (patch)
tree45aa7a530057061423e41cb6e9a605501bfdf6bf /activerecord/CHANGELOG.md
parentd3fa0259696ff20b77f9a2dfd206c9ab8627a669 (diff)
parent293875457bc5b0fccbf3e64bcd275cdac252f98c (diff)
downloadrails-1909808171d8bd9e8dcff0dfd652f05557ce6194.tar.gz
rails-1909808171d8bd9e8dcff0dfd652f05557ce6194.tar.bz2
rails-1909808171d8bd9e8dcff0dfd652f05557ce6194.zip
Merge pull request #9200 from wangjohn/unscoping_activerecord_merging
Introduce relation #unscope
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 2eaf388095..d265f04562 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,21 @@
## Rails 4.0.0 (unreleased) ##
+* Added functionality to unscope relations in a relations chain. For
+ instance, if you are passed in a chain of relations as follows:
+
+ Posts.select(:name => "John").order('id DESC')
+
+ but you want to get rid of order, then this feature allows you to do:
+
+ Posts.select(:name => "John").order("id DESC").unscope(:order)
+ == Posts.select(:name => "John")
+
+ The .unscope() function is more general than the .except() method because
+ .except() only works on the relation it is acting on. However, .unscope()
+ works for any relation in the entire relation chain.
+
+ *John Wang*
+
* Postgresql timestamp with time zone (timestamptz) datatype now returns a
ActiveSupport::TimeWithZone instance instead of a string