Sha256: 0cbd8c428de8c15ff7d9ca0cf370b1c2777e613276af77e5e5719a6ae9eb644a
Contents?: true
Size: 770 Bytes
Versions: 4
Compression:
Stored size: 770 Bytes
Contents
require 'active_admin/component' module ActiveAdmin module BatchActions # Build an BatchActionForm class BatchActionForm < ActiveAdmin::Component builder_method :batch_action_form attr_reader :prefix_html 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 # Override the default to_s to include a closing form tag def to_s content + closing_form_tag end private def closing_form_tag '</form>'.html_safe end end end end
Version data entries
4 entries across 4 versions & 1 rubygems