instance method
update_counters
Ruby on Rails 4.2.9
Since v3.0.20Signature
update_counters(id, counters)
Make sure the lock version column gets updated when counters are updated.
Parameters
-
idreq -
countersreq
Source
# File activerecord/lib/active_record/locking/optimistic.rb, line 168
def update_counters(id, counters)
counters = counters.merge(locking_column => 1) if locking_enabled?
super
end
Defined in activerecord/lib/active_record/locking/optimistic.rb line 168
· View on GitHub
· Improve this page
· Find usages on GitHub