diff options
author | Florent Guilleux <florent2@gmail.com> | 2012-06-16 17:41:43 -0500 |
---|---|---|
committer | Florent Guilleux <florent2@gmail.com> | 2012-06-16 17:41:43 -0500 |
commit | 7ed38907fd9e8a4f4a3fe9b33b1902acfafaef24 (patch) | |
tree | 6dbc5efaef1560826452881f7e0e6f4b86d56a54 /activerecord | |
parent | a28eda16d34e2b85c5f0afeaa3a40410043a0605 (diff) | |
download | rails-7ed38907fd9e8a4f4a3fe9b33b1902acfafaef24.tar.gz rails-7ed38907fd9e8a4f4a3fe9b33b1902acfafaef24.tar.bz2 rails-7ed38907fd9e8a4f4a3fe9b33b1902acfafaef24.zip |
Add documentation for ActiveRecord::QueryMethods#reverse_order [ci skip]
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 250c1f8769..08803552ff 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -405,6 +405,9 @@ module ActiveRecord self end + # Reverse the existing order clause on the relation. + # + # User.order('name ASC').reverse_order # generated SQL has 'ORDER BY name DESC' def reverse_order spawn.reverse_order! end |