aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations/join.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/relations/join.rb')
-rw-r--r--lib/arel/relations/join.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/relations/join.rb b/lib/arel/relations/join.rb
index 5356e57394..c1c3150629 100644
--- a/lib/arel/relations/join.rb
+++ b/lib/arel/relations/join.rb
@@ -44,10 +44,10 @@ module Arel
end
def relation_for(attribute)
- x = [externalize(relation1), externalize(relation2)].max do |r1, r2|
+ [externalize(relation1), externalize(relation2)].max do |r1, r2|
o1, o2 = r1.relation_for(attribute), r2.relation_for(attribute)
a1, a2 = o1 && o1[attribute], o2 && o2[attribute]
-
+
attribute / a1 <=> attribute / a2
end.relation_for(attribute)
end