module Godmin::Helpers::BatchActions
Public Instance Methods
batch_action_link(name, options)
click to toggle source
# File lib/godmin/helpers/batch_actions.rb, line 4 def batch_action_link(name, options) return unless @resource_service.include_batch_action?(name) link_to( translate_scoped("batch_actions.labels.#{name}", default: name.to_s.titleize), [*@resource_parents, @resource_class], method: :patch, class: "btn btn-default hidden", data: { behavior: "batch-actions-action-link", confirm: options[:confirm] ? translate_scoped("batch_actions.confirm_message") : false, value: name } ) end