aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/visitors/to_sql.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb
index 1c91d7f5e6..bbb2c54655 100644
--- a/lib/arel/visitors/to_sql.rb
+++ b/lib/arel/visitors/to_sql.rb
@@ -102,7 +102,11 @@ key on UpdateManager using UpdateManager#key=
def visit_Arel_Nodes_Values o
"VALUES (#{o.expressions.zip(o.columns).map { |value, attr|
- quote(value, attr && column_for(attr))
+ if Nodes::SqlLiteral === value
+ visit_Arel_Nodes_SqlLiteral value
+ else
+ quote(value, attr && column_for(attr))
+ end
}.join ', '})"
end