diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-16 17:10:35 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-16 17:10:35 -0700 |
commit | b06d351b701906efab737894be674c66561ec524 (patch) | |
tree | 3265dc32cb4eb7287e5f718c2131781cd45d0afc /lib/arel/relations | |
parent | c96155c4fdd9a15eeca6e59ca3f35197d2ad3541 (diff) | |
download | rails-b06d351b701906efab737894be674c66561ec524.tar.gz rails-b06d351b701906efab737894be674c66561ec524.tar.bz2 rails-b06d351b701906efab737894be674c66561ec524.zip |
this is as close as it's been
Diffstat (limited to 'lib/arel/relations')
-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 25dc75e8ea..490f545637 100644 --- a/lib/arel/relations/relation.rb +++ b/lib/arel/relations/relation.rb @@ -135,10 +135,9 @@ module Arel attributes.detect { |a| a.named?(name) } end - # TESTME - added original_attribute because of AR def find_attribute_matching_attribute(attribute) attributes.select { |a| a.match?(attribute) }.max do |a1, a2| - (attribute / a1.root) <=> (attribute / a2.root) + (a1.original_attribute / attribute) <=> (a2.original_attribute / attribute) end end end |