1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib
Lauro Caetano 6c311e0b75 Build the reverse_order on its proper method.
The reverse_order method was using a flag to control if the order should
be reversed or not. Instead of using this variable just build the reverse order
inside its proper method.

This implementation was leading to an unexpected behavior when using
reverse_order and then applying reorder(nil).

Example:
  Before
    Post.order(:name).reverse_order.reorder(nil)
    # => SELECT "posts".* FROM "posts"   ORDER BY "posts"."id" DESC

  After
    Post.order(:name).reverse_order.reorder(nil)
   # => SELECT "posts".* FROM "posts"
2014-04-07 16:23:34 -03:00
..
active_record Build the reverse_order on its proper method. 2014-04-07 16:23:34 -03:00
rails/generators Fix Generation of proper migration when 2014-03-25 20:27:37 +05:30
active_record.rb update copyright notices to 2014. [ci skip] 2014-01-01 23:59:49 +05:30