Permalink
Browse files

avoid extra string objects in the inner join case

  • Loading branch information...
1 parent 9367992 commit 890eaf4784fb6b4ee9e1a8f167f6a9b28525722e @tenderlove tenderlove committed Oct 15, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/arel/visitors/to_sql.rb
@@ -455,7 +455,12 @@ def visit_Arel_Nodes_OuterJoin o
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

0 comments on commit 890eaf4

Please sign in to comment.