instance method
locking_enabled?
Ruby on Rails 3.1.12
Since v2.2.3Signature
locking_enabled?()
Returns true if the lock_optimistically flag is set to true (which it is, by default) and the table includes the locking_column column (defaults to lock_version).
Source
# File activerecord/lib/active_record/locking/optimistic.rb, line 144
def locking_enabled?
lock_optimistically && columns_hash[locking_column]
end
Defined in activerecord/lib/active_record/locking/optimistic.rb line 144
· View on GitHub
· Improve this page
· Find usages on GitHub