diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-14 19:14:49 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-14 19:14:49 -0700 |
commit | 703326cdc2e6ad426c09cfbf7983f893552ac845 (patch) | |
tree | 8c8ffa45a2aa51ecc3da4dff175e5c0c5f6bce4e /lib/arel/visitors | |
parent | 6f2230652da18bdc60de2dcbf75f29e7376b918b (diff) | |
download | rails-703326cdc2e6ad426c09cfbf7983f893552ac845.tar.gz rails-703326cdc2e6ad426c09cfbf7983f893552ac845.tar.bz2 rails-703326cdc2e6ad426c09cfbf7983f893552ac845.zip |
defaulting values to a list
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 9a9dd20d52..4c2a6a10e4 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -17,7 +17,7 @@ module Arel "UPDATE #{visit o.relation}", ("SET #{o.values.map { |column,value| "#{quote_column_name(column.name)} = #{quote visit value}" - }.join ', '}" if o.values), + }.join ', '}" unless o.values.empty?), ("WHERE #{o.wheres.map { |x| visit x }.join ' AND '}" unless o.wheres.empty?) ].compact.join ' ' end |