diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-11-16 20:31:24 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-11-16 20:31:24 +0000 |
commit | 473202df83690d1b6ab08e6166a483109f8c769f (patch) | |
tree | ccf313d4a4fc223cf63ca268ef14086d82c31113 /activerecord/lib | |
parent | 32602acdb70c59a22aac94640bedddd566616c1d (diff) | |
download | rails-473202df83690d1b6ab08e6166a483109f8c769f.tar.gz rails-473202df83690d1b6ab08e6166a483109f8c769f.tar.bz2 rails-473202df83690d1b6ab08e6166a483109f8c769f.zip |
attr_readonly behaves well with optimistic locking. Closes #10188.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/locking/optimistic.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb index d8f9dee372..ecd6a2b258 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -76,7 +76,7 @@ module ActiveRecord begin affected_rows = connection.update(<<-end_sql, "#{self.class.name} Update with optimistic locking") UPDATE #{self.class.table_name} - SET #{quoted_comma_pair_list(connection, attributes_with_quotes(false))} + SET #{quoted_comma_pair_list(connection, attributes_with_quotes(false, false))} WHERE #{self.class.primary_key} = #{quote_value(id)} AND #{self.class.quoted_locking_column} = #{quote_value(previous_value)} end_sql |