instance method update_counters_with_lock

Ruby on Rails 2.2.3

Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

update_counters_with_lock(id, counters)

Make sure the lock version column gets updated when counters are updated.

Parameters

id req
counters req
Source
# File activerecord/lib/active_record/locking/optimistic.rb, line 141
        def update_counters_with_lock(id, counters)
          counters = counters.merge(locking_column => 1) if locking_enabled?
          update_counters_without_lock(id, counters)
        end

Defined in activerecord/lib/active_record/locking/optimistic.rb line 141 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Locking::Optimistic::ClassMethods

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close