Skip to content
Browse files

Ensure @last_column is cleared after visiting object

  • Loading branch information...
1 parent 18c87d2 commit c9bf52be8ba7acbc6fba542790683920b5c611e0 @norman norman committed Jan 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/arel/visitors/to_sql.rb
View
2 lib/arel/visitors/to_sql.rb
@@ -133,7 +133,7 @@ def visit_Arel_Nodes_SelectCore o
(visit(o.set_quantifier) if o.set_quantifier),
("#{o.projections.map { |x| visit x }.join ', '}" unless o.projections.empty?),
("FROM #{visit(o.source)}" if o.source && !o.source.empty?),
- ("WHERE #{o.wheres.map { |x| visit x }.join ' AND ' }" unless o.wheres.empty?),
+ ("WHERE #{o.wheres.map { |x| accept x }.join ' AND ' }" unless o.wheres.empty?),
("GROUP BY #{o.groups.map { |x| visit x }.join ', ' }" unless o.groups.empty?),
(visit(o.having) if o.having),
].compact.join ' '

0 comments on commit c9bf52b

Please sign in to comment.
Something went wrong with that request. Please try again.