diff options
Diffstat (limited to 'lib/arel/visitors/to_sql.rb')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index dc65e86219..46f70d0f7c 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -46,8 +46,8 @@ module Arel end def visit_Arel_Nodes_Values o - "VALUES (#{o.expressions.map { |value| - value.nil? ? 'NULL' : visit(value) + "VALUES (#{o.expressions.zip(o.columns).map { |value, column| + quote(value, column && column.column) }.join ', '})" end |