Module: Amistad::ActiveRecord::HasActions::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#has_predefined_action(action) ⇒ Object



19
20
21
# File 'lib/amistad/active_record/has_actions.rb', line 19

def has_predefined_action(action)
  predefined_actions.has_key?(action)
end

#predefine_action(action, options = nil) ⇒ Object



15
16
17
# File 'lib/amistad/active_record/has_actions.rb', line 15

def predefine_action(action, options = nil)
  predefined_actions[action] = Action.new(options)
end

#predefined_actionsObject



11
12
13
# File 'lib/amistad/active_record/has_actions.rb', line 11

def predefined_actions
  @@predefined_actions ||= {}
end

#remove_all_predefined_actionsObject



23
24
25
# File 'lib/amistad/active_record/has_actions.rb', line 23

def remove_all_predefined_actions
  @@predefined_actions = {}
end