1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test
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/connection_adapters
assets
cases Build the reverse_order on its proper method. 2014-04-07 16:23:34 -03:00
fixtures Extend fixture label replacement to allow string interpolation 2014-03-15 22:11:36 -04:00
migrations activerecord: Initialize Migration with version from MigrationProxy. 2014-01-06 10:46:35 -05:00
models Fix the test defining the models in the right place 2014-04-04 19:44:17 -03:00
schema Merge pull request #14579 from senny/pg/remove_string_limit 2014-04-04 19:51:35 -03:00
support Add ConnectionHelper to refactor tests. 2014-04-03 01:06:43 -07:00
.gitignore
config.example.yml
config.rb