class ActiveAdmin::BatchActions::BatchActionPopover

Build an BatchActionPopover

Public Instance Methods

action(batch_action, options = {}) click to toggle source
# File lib/active_admin/batch_actions/views/batch_action_popover.rb, line 14
def action(batch_action, options = {})
  options[:class] ||= []
  options[:class] += %w(batch_action)
  options.merge! "data-action" => batch_action.sym,
                 "data-confirm" => batch_action.confirm

  title = I18n.t("active_admin.batch_actions.labels.#{batch_action.sym}", :default => batch_action.title)
  label = I18n.t("active_admin.batch_actions.action_label", :title => title)

  super(label, "#", options)
end
build(options = {}, &block) click to toggle source
# File lib/active_admin/batch_actions/views/batch_action_popover.rb, line 9
def build(options = {}, &block)
  options[:id] ||= "batch_actions_popover"
  super(options)
end