diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-09 09:36:24 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-09 09:36:24 -0800 |
commit | 529013d974312595555e2f080c5494ea23b3d892 (patch) | |
tree | eba5fa239e5989f46cfa35dfb557be739bde69c6 /lib | |
parent | d9c27c1ebb5179fab5a0ca840329ab73a7005b32 (diff) | |
parent | c9bf52be8ba7acbc6fba542790683920b5c611e0 (diff) | |
download | rails-529013d974312595555e2f080c5494ea23b3d892.tar.gz rails-529013d974312595555e2f080c5494ea23b3d892.tar.bz2 rails-529013d974312595555e2f080c5494ea23b3d892.zip |
Merge pull request #93 from norman/fix-for-where-true
Ensure @last_column is cleared after visiting object
Diffstat (limited to 'lib')
-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 ' ' |