class ActiveAdmin::DSL
def batch_action(title, options = {}, &block)
-
options
(Hash
) -- valid keys include: -
title
(Symbol or String
) --
def batch_action(title, options = {}, &block) # Create symbol & title information if title.is_a? String sym = title.titleize.tr(" ", "").underscore.to_sym else sym = title title = sym.to_s.titleize end # Either add/remove the batch action unless options == false config.add_batch_action(sym, title, options, &block) else config.remove_batch_action sym end end