Class: Audit

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/generators/templates/audit_model.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.action_filter(action) ⇒ Object



12
13
14
# File 'lib/generators/templates/audit_model.rb', line 12

def self.action_filter(action)
  where("action = ?", action.to_s)
end

.model_filter(model_changed) ⇒ Object



8
9
10
# File 'lib/generators/templates/audit_model.rb', line 8

def self.model_filter(model_changed)
  where("model_changed = ?", model_changed.to_s.camelize)
end

Instance Method Details

#action_invokerObject



4
5
6
# File 'lib/generators/templates/audit_model.rb', line 4

def action_invoker
  YAML.load(invoker)
end