diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2013-07-20 20:15:48 -0700 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2013-07-22 04:39:38 -0700 |
commit | c083dc22dd16c3c2e43bbe1e13e4ee210c2adbc1 (patch) | |
tree | 9143603fa3a614693b750178197e45c32f15bdfb /activerecord/lib | |
parent | 39b5bfe2394d0a4d479b41ee8d170e0f6c65fd59 (diff) | |
download | rails-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')
-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 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)) |