aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/locking
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2013-07-20 20:15:48 -0700
committerBen Woosley <ben.woosley@gmail.com>2013-07-22 04:39:38 -0700
commitc083dc22dd16c3c2e43bbe1e13e4ee210c2adbc1 (patch)
tree9143603fa3a614693b750178197e45c32f15bdfb /activerecord/lib/active_record/locking
parent39b5bfe2394d0a4d479b41ee8d170e0f6c65fd59 (diff)
downloadrails-c083dc22dd16c3c2e43bbe1e13e4ee210c2adbc1.tar.gz
rails-c083dc22dd16c3c2e43bbe1e13e4ee210c2adbc1.tar.bz2
rails-c083dc22dd16c3c2e43bbe1e13e4ee210c2adbc1.zip
Tidy up the "Specified column type for quote_value" changes
This includes fixing typos in changelog, removing a deprecated mocha/setup test require, and preferring the `column_for_attribute` accessor over direct access to the columns_hash in the new code.
Diffstat (limited to 'activerecord/lib/active_record/locking')
-rw-r--r--activerecord/lib/active_record/locking/optimistic.rb2
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 a1501ee453..626fe40103 100644
--- a/activerecord/lib/active_record/locking/optimistic.rb
+++ b/activerecord/lib/active_record/locking/optimistic.rb
@@ -82,7 +82,7 @@ module ActiveRecord
stmt = relation.where(
relation.table[self.class.primary_key].eq(id).and(
- relation.table[lock_col].eq(self.class.quote_value(previous_lock_value, self.class.columns_hash[lock_col]))
+ relation.table[lock_col].eq(self.class.quote_value(previous_lock_value, column_for_attribute(lock_col)))
)
).arel.compile_update(arel_attributes_with_values_for_update(attribute_names))