diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2018-02-26 11:25:45 -0700 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2018-02-26 11:25:45 -0700 |
commit | c2a2b84d8d9185127d59a4760efb7356aea25af1 (patch) | |
tree | 83c955338a10cda4583675e64dd73fe719a5de9b /activerecord/lib/active_record/locking | |
parent | 948b931925febac3c965ab13470065ced68f7b53 (diff) | |
download | rails-c2a2b84d8d9185127d59a4760efb7356aea25af1.tar.gz rails-c2a2b84d8d9185127d59a4760efb7356aea25af1.tar.bz2 rails-c2a2b84d8d9185127d59a4760efb7356aea25af1.zip |
Ensure we don't write virtual attributes on update, too
See 948b931925febac3c965ab13470065ced68f7b53 for context
Diffstat (limited to 'activerecord/lib/active_record/locking')
-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 e1e24e2814..bf17f27e68 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -78,6 +78,7 @@ module ActiveRecord end def _update_record(attribute_names = self.attribute_names) + attribute_names &= self.class.column_names return super unless locking_enabled? return 0 if attribute_names.empty? |