diff options
Diffstat (limited to 'activerecord/lib/active_record/locking.rb')
-rw-r--r-- | activerecord/lib/active_record/locking.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/locking.rb b/activerecord/lib/active_record/locking.rb index 635fae89d8..d0d6296ae7 100644 --- a/activerecord/lib/active_record/locking.rb +++ b/activerecord/lib/active_record/locking.rb @@ -34,7 +34,7 @@ module ActiveRecord affected_rows = connection.update( "UPDATE #{self.class.table_name} "+ - "SET #{quoted_comma_pair_list(connection, attributes_with_quotes(false))} " + + "SET #{quoted_comma_pair_list(attributes_with_quotes(false))} " + "WHERE #{self.class.primary_key} = #{quote(id)} AND lock_version = #{quote(previous_value)}", "#{self.class.name} Update with optimistic locking" ) @@ -54,4 +54,4 @@ module ActiveRecord lock_optimistically && respond_to?(:lock_version) end end -end
\ No newline at end of file +end |