diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-14 19:48:33 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-14 19:48:33 -0700 |
commit | e1155aa922a04e1cce60a660b4b779bfe3d7d7f5 (patch) | |
tree | 6171a44551b43f451c4a2e64b3f4179e4b147585 /lib/arel/visitors | |
parent | 703326cdc2e6ad426c09cfbf7983f893552ac845 (diff) | |
download | rails-e1155aa922a04e1cce60a660b4b779bfe3d7d7f5.tar.gz rails-e1155aa922a04e1cce60a660b4b779bfe3d7d7f5.tar.bz2 rails-e1155aa922a04e1cce60a660b4b779bfe3d7d7f5.zip |
update is working on the select manager
Diffstat (limited to 'lib/arel/visitors')
-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 4c2a6a10e4..5536ba0267 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -16,7 +16,7 @@ module Arel [ "UPDATE #{visit o.relation}", ("SET #{o.values.map { |column,value| - "#{quote_column_name(column.name)} = #{quote visit value}" + "#{quote_column_name(column.name)} = #{value ? quote(visit(value)) : 'NULL'}" }.join ', '}" unless o.values.empty?), ("WHERE #{o.wheres.map { |x| visit x }.join ' AND '}" unless o.wheres.empty?) ].compact.join ' ' |