aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-04 17:31:04 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-04 17:31:04 -0700
commitf9876c67fb372817af2e69c36c5739879d1b238c (patch)
tree3763f4be46c0e06b46199398a6ed2ad88e74931a /lib
parent880efb9bd45a5d7134153a0f1d78cfa7f6cd8470 (diff)
downloadrails-f9876c67fb372817af2e69c36c5739879d1b238c.tar.gz
rails-f9876c67fb372817af2e69c36c5739879d1b238c.tar.bz2
rails-f9876c67fb372817af2e69c36c5739879d1b238c.zip
cleanup
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/relations/join.rb8
-rw-r--r--lib/arel/relations/relation.rb4
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