Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #93 from norman/fix-for-where-true

Ensure @last_column is cleared after visiting object
  • Loading branch information...
commit 529013d974312595555e2f080c5494ea23b3d892 2 parents d9c27c1 + c9bf52b
@tenderlove tenderlove authored
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 ' '
Please sign in to comment.
Something went wrong with that request. Please try again.