Class: ActiveAdmin::BatchActions::BatchActionSelector

Inherits:
Component
  • Object
show all
Defined in:
lib/active_admin/batch_actions/views/batch_action_selector.rb

Instance Method Summary collapse

Instance Method Details

#build(batch_actions) ⇒ Object

Build a new batch actions selector

Parameters:

  • batch_actions (Array)

    An array of batch actions



13
14
15
16
# File 'lib/active_admin/batch_actions/views/batch_action_selector.rb', line 13

def build(batch_actions)
  @batch_actions = Array(batch_actions)
  @drop_down = build_drop_down
end

#to_sObject

We don’t want to wrap the action list (or any other children) in an unnecessary div, so instead we just return the children



20
21
22
# File 'lib/active_admin/batch_actions/views/batch_action_selector.rb', line 20

def to_s
  children.to_s
end