The version column used for optimistic locking. Defaults to lock_version.
# File lib/active_record/locking/optimistic.rb, line 149 def locking_column reset_locking_column end
Is optimistic locking enabled for this table? 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).
# File lib/active_record/locking/optimistic.rb, line 138 def locking_enabled? lock_optimistically && columns_hash[locking_column] end
Quote the column name used for optimistic locking.
# File lib/active_record/locking/optimistic.rb, line 154 def quoted_locking_column connection.quote_column_name(locking_column) end
Reset the column used for optimistic locking back to the lock_version default.
# File lib/active_record/locking/optimistic.rb, line 159 def reset_locking_column set_locking_column DEFAULT_LOCKING_COLUMN end
Generated with the Darkfish Rdoc Generator 2.