diff options
author | Norman Clarke <norman@njclarke.com> | 2012-01-07 14:25:59 -0300 |
---|---|---|
committer | Norman Clarke <norman@njclarke.com> | 2012-01-07 14:25:59 -0300 |
commit | c9bf52be8ba7acbc6fba542790683920b5c611e0 (patch) | |
tree | 9b3e36a0fd7787a5dff63f940fdc48f58edc2bc3 /lib/arel/visitors | |
parent | 18c87d2913409bf692512ade96e59297f3574000 (diff) | |
download | rails-c9bf52be8ba7acbc6fba542790683920b5c611e0.tar.gz rails-c9bf52be8ba7acbc6fba542790683920b5c611e0.tar.bz2 rails-c9bf52be8ba7acbc6fba542790683920b5c611e0.zip |
Ensure @last_column is cleared after visiting object
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index ab48ce8724..ccaa328a78 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -133,7 +133,7 @@ key on UpdateManager using UpdateManager#key= (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 ' ' |