Class: ActiveRecord::ConnectionAdapters::TableDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/ar-audit-tracer.rb

Instance Method Summary collapse

Instance Method Details

#authorstamps(type = :string, *args) ⇒ Object

Creates author columns …

Parameters:

  • Symbol

    type The desired type for the columns, defaults to :string

  • Hash

    *args Column options from rails



36
37
38
39
40
# File 'lib/ar-audit-tracer.rb', line 36

def authorstamps(type=:string, *args)
  options = args.extract_options!
  column(:created_by, type, options)
  column(:updated_by, type, options)
end