diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 18:21:56 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 18:21:56 -0400 |
commit | 10c4b42c35f61145ac6ebb8d36f504344eef47cd (patch) | |
tree | 3caee2c32a6fbcd0fad4c11ad9235d96670f7ffc /lib/arel/algebra/primitives/ordering.rb | |
parent | c106c1ef59527331c9945f5f95e6b4e27194ac06 (diff) | |
download | rails-10c4b42c35f61145ac6ebb8d36f504344eef47cd.tar.gz rails-10c4b42c35f61145ac6ebb8d36f504344eef47cd.tar.bz2 rails-10c4b42c35f61145ac6ebb8d36f504344eef47cd.zip |
Fix bug in Order equality where Descending.new(attribute) was == Ascending.new(attribute)
Diffstat (limited to 'lib/arel/algebra/primitives/ordering.rb')
-rw-r--r-- | lib/arel/algebra/primitives/ordering.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/arel/algebra/primitives/ordering.rb b/lib/arel/algebra/primitives/ordering.rb index a60d794f27..3efb4c6280 100644 --- a/lib/arel/algebra/primitives/ordering.rb +++ b/lib/arel/algebra/primitives/ordering.rb @@ -1,7 +1,5 @@ module Arel class Ordering - attributes :attribute - deriving :initialize, :== delegate :relation, :to => :attribute def bind(relation) @@ -13,6 +11,13 @@ module Arel end end - class Ascending < Ordering; end - class Descending < Ordering; end + class Ascending < Ordering + attributes :attribute + deriving :initialize, :== + end + + class Descending < Ordering + attributes :attribute + deriving :initialize, :== + end end |