diff options
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index 76355a00df..c4c2e6fe0f 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -455,7 +455,12 @@ key on UpdateManager using UpdateManager#key= end def visit_Arel_Nodes_InnerJoin o - "INNER JOIN #{visit o.left} #{visit o.right if o.right}" + s = "INNER JOIN #{visit o.left}" + if o.right + s << SPACE + s << visit(o.right) + end + s end def visit_Arel_Nodes_On o |