aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorTima Maslyuchenko <n3imo0o@gmail.com>2012-09-26 22:16:17 +0300
committerTima Maslyuchenko <n3imo0o@gmail.com>2012-10-12 17:57:24 +0300
commit633ea6a826cb5e587165f78d15770271cb39f670 (patch)
treef100600013a2c55b63baa853ff79992ad3734797 /activerecord/CHANGELOG.md
parent79db8db415ffb86ab23e4d319c1035d926160d2d (diff)
downloadrails-633ea6a826cb5e587165f78d15770271cb39f670.tar.gz
rails-633ea6a826cb5e587165f78d15770271cb39f670.tar.bz2
rails-633ea6a826cb5e587165f78d15770271cb39f670.zip
learn ActiveRecord::QueryMethods#order work with hash arguments
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 9abfe2e6fd..7b80598171 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,15 @@
## Rails 4.0.0 (unreleased) ##
+* Learn ActiveRecord::QueryMethods#order work with hash arguments
+
+ When symbol or hash passed we convert it to Arel::Nodes::Ordering.
+ If we pass invalid direction(like name: :DeSc) ActiveRecord::QueryMethods#order will raise an exception
+
+ User.order(:name, email: :desc)
+ # SELECT "users".* FROM "users" ORDER BY "users"."name" ASC, "users"."email" DESC
+
+ *Tima Maslyuchenko*
+
* Rename `ActiveRecord::Fixtures` class to `ActiveRecord::FixtureSet`.
Instances of this class normally hold a collection of fixtures (records)
loaded either from a single YAML file, or from a file and a folder