class ActiveAdmin::BatchActions::BatchActionForm

Build an BatchActionForm

Attributes

prefix_html[R]

Public Instance Methods

build(options = {}, &block) click to toggle source
Calls superclass method
# 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(active_admin_config.batch_action_path(params), :id => options[:id])
  input(:name => :batch_action, :id => :batch_action, :type => :hidden)

  super(options)
end
to_s() click to toggle source

Override the default to_s to include a closing form tag

# File lib/active_admin/batch_actions/views/batch_action_form.rb, line 23
def to_s
  content + closing_form_tag
end

Private Instance Methods

closing_form_tag() click to toggle source
# File lib/active_admin/batch_actions/views/batch_action_form.rb, line 29
def closing_form_tag
  '</form>'.html_safe
end