aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-07-29 23:18:33 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-07-29 23:18:33 -0300
commit92c5a2244ec3e58fd5e70e7dd2d7882b80183c80 (patch)
tree62de003cb6d3c5f1088bf9a98d06891ff4927833 /activerecord/CHANGELOG.md
parentfbaae891ac5361a03aaea07bc95bc11b3c6e11fd (diff)
downloadrails-92c5a2244ec3e58fd5e70e7dd2d7882b80183c80.tar.gz
rails-92c5a2244ec3e58fd5e70e7dd2d7882b80183c80.tar.bz2
rails-92c5a2244ec3e58fd5e70e7dd2d7882b80183c80.zip
Revert change on ActiveRecord::Relation#order method that prepends new
order on the old ones The previous behavior added a major backward incompatibility since it impossible to have a upgrade path without major changes on the application code. We are taking the most conservative path to be consistent with the idea of having a smoother upgrade on Rails 4. We are reverting the behavior for what was in Rails 3.x and, if needed, we will implement a new API to prepend the order clauses in Rails 4.1.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 61dba12b64..f617c6ede4 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,18 @@
+* Revert `ActiveRecord::Relation#order` change that make new order
+ prepend the old one.
+
+ Before:
+
+ User.order("name asc").order("created_at desc")
+ # SELECT * FROM users ORDER BY created_at desc, name asc
+
+ After:
+
+ User.order("name asc").order("created_at desc")
+ # SELECT * FROM users ORDER BY name asc, created_at desc
+
+ This also affects order defined in `default_scope` or any kind of associations.
+
* Don't allow `quote_value` to be called without a column.
Some adapters require column information to do their job properly.