From 5dcbca25cef8e8f5809913977cfeb4366c8b44d0 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Fri, 14 Aug 2009 10:49:15 -0300 Subject: Allow joining a StringJoin with another join relation. --- lib/arel/engines/sql/relations/operations/join.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/arel/engines/sql') diff --git a/lib/arel/engines/sql/relations/operations/join.rb b/lib/arel/engines/sql/relations/operations/join.rb index 7c5e13510a..a3aaaa163b 100644 --- a/lib/arel/engines/sql/relations/operations/join.rb +++ b/lib/arel/engines/sql/relations/operations/join.rb @@ -26,8 +26,8 @@ module Arel end class StringJoin < Join - def joins(_, __ = nil) - relation2 + def joins(environment, formatter = Sql::TableReference.new(environment)) + [relation1.joins(environment), relation2].compact.join(" ") end end end -- cgit v1.2.3