diff options
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/visitors/where_sql.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/arel/visitors/where_sql.rb b/lib/arel/visitors/where_sql.rb index afde15a6c5..80797205c9 100644 --- a/lib/arel/visitors/where_sql.rb +++ b/lib/arel/visitors/where_sql.rb @@ -5,7 +5,11 @@ module Arel def visit_Arel_Nodes_SelectCore o, collector collector << "WHERE " - inject_join o.wheres, collector, ' AND ' + wheres = o.wheres.map do |where| + Nodes::SqlLiteral.new(@connection.visitor.accept(where, collector.class.new).value) + end + + inject_join wheres, collector, ' AND ' end end end |