diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-20 16:19:16 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-20 16:19:16 -0700 |
commit | b5bcb8b11d7b95309a63a6dde07227007e22217e (patch) | |
tree | 0374ce48a8d931481b5edfb996a56c6430a56114 /lib/arel/algebra/predicates.rb | |
parent | fbb9896dddc4feb71c9526d7773ecd65888a3726 (diff) | |
download | rails-b5bcb8b11d7b95309a63a6dde07227007e22217e.tar.gz rails-b5bcb8b11d7b95309a63a6dde07227007e22217e.tar.bz2 rails-b5bcb8b11d7b95309a63a6dde07227007e22217e.zip |
comparing children directly
Diffstat (limited to 'lib/arel/algebra/predicates.rb')
-rw-r--r-- | lib/arel/algebra/predicates.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/arel/algebra/predicates.rb b/lib/arel/algebra/predicates.rb index df2618a148..f7c6ee599f 100644 --- a/lib/arel/algebra/predicates.rb +++ b/lib/arel/algebra/predicates.rb @@ -43,7 +43,7 @@ module Arel end def ==(other) - same_elements?(@predicates, other.predicates) + super || children == other.children end def bind(relation) @@ -51,13 +51,6 @@ module Arel *predicates.map {|p| p.find_correlate_in(relation)} ) end - - private - - def same_elements?(a1, a2) - a1.inject({}) { |h,e| h[e] = a1.count(e); h } == - a2.inject({}) { |h,e| h[e] = a2.count(e); h } - end end class Any < Polyadic |