diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-06-20 17:41:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-20 17:41:00 -0400 |
commit | 890de7705257323d05c8831b8c1ab43433b0ba89 (patch) | |
tree | 1359497c4fe8798416dc51acd96de4456c7b890c /activerecord/lib | |
parent | ec8e38943b360312c8db97ca5d1ad4b09eba6683 (diff) | |
parent | f08bc757ebe108df46d76d6fd0029546539f817f (diff) | |
download | rails-890de7705257323d05c8831b8c1ab43433b0ba89.tar.gz rails-890de7705257323d05c8831b8c1ab43433b0ba89.tar.bz2 rails-890de7705257323d05c8831b8c1ab43433b0ba89.zip |
Merge pull request #28926 from bogdanvlviv/fix-destroy-with-locking_column-value-null
Fix destroy with locking_column value null
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 f8fcb7ccaa..522da6a571 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -128,7 +128,7 @@ module ActiveRecord if locking_enabled? locking_column = self.class.locking_column - relation = relation.where(locking_column => _read_attribute(locking_column)) + relation = relation.where(locking_column => read_attribute_before_type_cast(locking_column)) end relation |