Class: ActiveAdmin::BatchActions::BatchActionForm

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

Overview

Build an BatchActionForm

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) prefix_html (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

- (Object) build(options = {}, &block)



12
13
14
15
16
17
18
19
20
# File 'lib/active_admin/batch_actions/views/batch_action_form.rb', line 12

def build(options = {}, &block)
  options[:id] ||= "collection_selection"

  # Open a form
  text_node form_tag(send(active_admin_config.batch_action_path), :id => options[:id])
  input(:name => :batch_action, :id => :batch_action, :type => :hidden)

  super(options)
end

- (Object) to_s

Override the default to_s to include a closing form tag



23
24
25
# File 'lib/active_admin/batch_actions/views/batch_action_form.rb', line 23

def to_s
  content + closing_form_tag
end