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



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

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



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

def to_s
  children.to_s
end