Class: ActiveAdmin::BatchActions::BatchActionForm
- Inherits:
-
Component
- Object
- Arbo::Component
- Component
- ActiveAdmin::BatchActions::BatchActionForm
- Defined in:
- lib/active_admin/batch_actions/views/batch_action_form.rb
Overview
Build a BatchActionForm
Instance Attribute Summary collapse
-
#prefix_html ⇒ Object
readonly
Returns the value of attribute prefix_html.
Instance Method Summary collapse
- #build(options = {}, &block) ⇒ Object
- #render_in(context = arbo_context) ⇒ Object
-
#to_s ⇒ Object
Override the default to_s to include a closing form tag.
Instance Attribute Details
#prefix_html ⇒ Object (readonly)
Returns the value of attribute prefix_html.
10 11 12 |
# File 'lib/active_admin/batch_actions/views/batch_action_form.rb', line 10 def prefix_html @prefix_html end |
Instance Method Details
#build(options = {}, &block) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/active_admin/batch_actions/views/batch_action_form.rb', line 12 def build( = {}, &block) [:id] ||= "collection_selection" # Open a form with two hidden input fields: # batch_action => name of the specific action called # batch_action_inputs => a JSON string of any requested confirmation values text_node form_tag active_admin_config.route_batch_action_path(params, ), id: [:id] input name: :batch_action, id: :batch_action, type: :hidden input name: :batch_action_inputs, id: :batch_action_inputs, type: :hidden super() end |
#render_in(context = arbo_context) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/active_admin/batch_actions/views/batch_action_form.rb', line 30 def render_in(context = arbo_context) children.collect do |element| element.render_in_or_to_s(context) end context.output_buffer << closing_form_tag end |
#to_s ⇒ Object
Override the default to_s to include a closing form tag
26 27 28 |
# File 'lib/active_admin/batch_actions/views/batch_action_form.rb', line 26 def to_s content + closing_form_tag end |