I’m trying to use activeadmin’s batch_action so I can run actions on more than one record. However when trying to run my rails server I get the following error.
undefined method `batch_action' for #<ActiveAdmin::ResourceDSL:0xb11f980> (NoMethodError)
Here is the activeadmin resource code:
ActiveAdmin.register Product do
batch_action :destroy, false
filter :name
index do
selectable_column
column :name
default_actions
end
controller do
def current_company
@current_company
end
end
end
I’m not sure where I’m getting it wrong – I need to show a corresponding checkboxes against the records and then define a batch action. Where am I getting it wrong here?
Got the answer 🙂 was a wrong entry in my gemfile.
https://github.com/gregbell/active_admin/issues/1302