diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2013-07-13 22:02:05 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2013-07-13 22:02:05 -0700 |
commit | 5a52fbe1cbfe3c58184f33ca1bfc451e6e473284 (patch) | |
tree | a935947cda24a604a3c7eeea203a22e3ad638915 /activerecord/lib/active_record/locking/optimistic.rb | |
parent | ba8b55f7911b4a74e151639150f997cca47488c9 (diff) | |
parent | 33354aa23e9d34bdf5aae8ab942cf830bf9f2782 (diff) | |
download | rails-5a52fbe1cbfe3c58184f33ca1bfc451e6e473284.tar.gz rails-5a52fbe1cbfe3c58184f33ca1bfc451e6e473284.tar.bz2 rails-5a52fbe1cbfe3c58184f33ca1bfc451e6e473284.zip |
Merge pull request #11424 from kennyj/fix_column_defaults_caching
Reset @column_defaults when assigning locking_column.
Diffstat (limited to 'activerecord/lib/active_record/locking/optimistic.rb')
-rw-r--r-- | activerecord/lib/active_record/locking/optimistic.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb index 209de78898..2a7996c4e7 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -138,6 +138,7 @@ module ActiveRecord # Set the column to use for optimistic locking. Defaults to +lock_version+. def locking_column=(value) + @column_defaults = nil @locking_column = value.to_s end |