diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-04 17:31:04 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-04 17:31:04 -0700 |
commit | f9876c67fb372817af2e69c36c5739879d1b238c (patch) | |
tree | 3763f4be46c0e06b46199398a6ed2ad88e74931a /lib/arel | |
parent | 880efb9bd45a5d7134153a0f1d78cfa7f6cd8470 (diff) | |
download | rails-f9876c67fb372817af2e69c36c5739879d1b238c.tar.gz rails-f9876c67fb372817af2e69c36c5739879d1b238c.tar.bz2 rails-f9876c67fb372817af2e69c36c5739879d1b238c.zip |
cleanup
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/relations/join.rb | 8 | ||||
-rw-r--r-- | lib/arel/relations/relation.rb | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/arel/relations/join.rb b/lib/arel/relations/join.rb index 048cb170e5..0dec80af79 100644 --- a/lib/arel/relations/join.rb +++ b/lib/arel/relations/join.rb @@ -57,11 +57,11 @@ module Arel def relation_for(attribute) x = [relation1[attribute], relation2[attribute]].select { |a| a =~ attribute }.min do |a1, a2| (attribute % a1).size <=> (attribute % a2).size - end - if x.relation.aggregation? - x.relation + end.relation + if x.aggregation? + x else - x.original_relation + x.relation_for(attribute) end end diff --git a/lib/arel/relations/relation.rb b/lib/arel/relations/relation.rb index 846594e7cd..336960f424 100644 --- a/lib/arel/relations/relation.rb +++ b/lib/arel/relations/relation.rb @@ -103,10 +103,6 @@ module Arel def name_for(relation) relation.name end - - def table - self - end end include Externalizable |