From 5a67d47a968e7c9febdba1b8c24d1db84abaac83 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 22 Sep 2010 15:59:10 -0700 Subject: quoting update values using the column --- lib/arel/visitors/to_sql.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/arel/visitors/to_sql.rb') diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index 710b6143ec..2ccc9d7d3f 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -179,9 +179,7 @@ module Arel end def visit_Arel_Nodes_Assignment o - right = o.right - - right = right.nil? ? 'NULL' : visit(right) + right = quote(o.right, o.left.column) "#{visit o.left} = #{right}" end -- cgit v1.2.3