Module: ActiveAdmin::ActionItems::ClassMethods

Defined in:
lib/active_admin/action_items.rb

Instance Method Summary collapse

Instance Method Details

#action_item(options = {}, &block) ⇒ Object



13
14
15
# File 'lib/active_admin/action_items.rb', line 13

def action_item(options = {}, &block)
  self.action_items << ActiveAdmin::ActionItems::ActionItem.new(options, &block)
end

#action_items_for(action) ⇒ Object



21
22
23
# File 'lib/active_admin/action_items.rb', line 21

def action_items_for(action)
  action_items.select{|item| item.display_on?(action) }
end

#clear_action_items!Object



17
18
19
# File 'lib/active_admin/action_items.rb', line 17

def clear_action_items!
  self.action_items = []
end