diff options
-rw-r--r-- | lib/arel/visitors/join_sql.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/arel/visitors/join_sql.rb b/lib/arel/visitors/join_sql.rb index bca15bbb0a..c1e00ea8f0 100644 --- a/lib/arel/visitors/join_sql.rb +++ b/lib/arel/visitors/join_sql.rb @@ -14,7 +14,10 @@ module Arel end def visit_Arel_Nodes_StringJoin o - visit o.right + [ + (visit o.left if Nodes::Join === o.left), + visit(o.right) + ].join ' ' end def visit_Arel_Nodes_OuterJoin o |