diff options
Diffstat (limited to 'lib/arel/relations/relation.rb')
-rw-r--r-- | lib/arel/relations/relation.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/arel/relations/relation.rb b/lib/arel/relations/relation.rb index b2f811cea2..db7d746c79 100644 --- a/lib/arel/relations/relation.rb +++ b/lib/arel/relations/relation.rb @@ -142,8 +142,7 @@ module Arel # TESTME - added relation_for(x)[x] because of AR def find_attribute_matching_attribute(attribute) attributes.select { |a| a.match?(attribute) }.max do |a1, a2| - # FIXME relation_for(a1)[a1] should be a1.original or something - (attribute / relation_for(a1)[a1]) <=> (attribute / relation_for(a2)[a2]) + (attribute / a1.original_attribute) <=> (attribute / a2.original_attribute) end end |