From f9876c67fb372817af2e69c36c5739879d1b238c Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Sun, 4 May 2008 17:31:04 -0700 Subject: cleanup --- lib/arel/relations/join.rb | 8 ++++---- lib/arel/relations/relation.rb | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3