module ActiveRecord::Locking::Optimistic::ClassMethods

def locking_enabled?

+locking_column+ column (defaults to +lock_version+).
(which it is, by default) and the table includes the
Returns true if the +lock_optimistically+ flag is set to true
def locking_enabled?
  lock_optimistically && columns_hash[locking_column]
end