Class: ActiveRecord::ConnectionAdapters::TableDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/approval2/active_record_adapter.rb

Instance Method Summary collapse

Instance Method Details

#approval_columns(*args) ⇒ Object



3
4
5
6
7
8
# File 'lib/approval2/active_record_adapter.rb', line 3

def approval_columns(*args)
  column(:approval_status, :string, limit: 1, default: 'U', null: false, comment: "the approval status of the record, A (approved), U (unapproved)")
  column(:last_action, :string, limit: 1, default: 'C', comment: "the last action on the record, C (create), U (update), D (delete)")
  column(:approved_id, :integer, comment: "the id of the approved record that was edited, and resulted in this unapproved record ")
  column(:approved_version, :integer, comment: "the lock_version of the approved record at the time it was edited, and resulted in this unapproved record")
end