module ActiveRecord::SchemaStatements

Public Instance Methods

add_fingerprints(table_name) click to toggle source

Adds fingerprints (created_by and updated_by) columns to the named table.

Examples
add_fingerprints(:suppliers)
# File lib/fingerprints/active_record.rb, line 35
def add_fingerprints(table_name)
  add_column table_name, :created_by, :integer
  add_column table_name, :updated_by, :integer
end
remove_fingerprints(table_name) click to toggle source

Removes the fingerprint columns (created_by and updated_by) from the table definition.

Examples
remove_fingerprints(:suppliers)
# File lib/fingerprints/active_record.rb, line 43
def remove_fingerprints(table_name)
  remove_column table_name, :updated_by
  remove_column table_name, :created_by
end