Module: Blamestamp::Schema

Extended by:
ActiveSupport::Concern
Defined in:
lib/blamestamp/schema.rb

Instance Method Summary collapse

Instance Method Details

#blamestamps(options = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/blamestamp/schema.rb', line 5

def blamestamps(options = {})
  flds = options_to_fields(options)
  column(flds[0], :datetime)
  column(flds[1], :datetime)
  column(flds[2], :integer)
  column(flds[3], :integer)
end

#drop_blamestamps(tbl_name, options = {}) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/blamestamp/schema.rb', line 13

def drop_blamestamps(tbl_name, options = {})
  flds = options_to_fields(options)
  remove_column tbl_name, :blame_cre_at
  remove_column tbl_name, :blame_upd_at
  remove_column tbl_name, :blame_cre_by
  remove_column tbl_name, :blame_upd_by
end