Module: Amistad::ActiveRecord::HasActions::InstanceMethods

Defined in:
lib/amistad/active_record/has_actions.rb

Instance Method Summary collapse

Instance Method Details

#did(what) ⇒ Object



29
30
31
32
33
34
35
36
37
# File 'lib/amistad/active_record/has_actions.rb', line 29

def did(what)
  action = if what.is_a? Symbol
             self.class.predefined_actions[what].dup
           else
             Action.new(:description => what)
           end
  actions << action
  action
end