In Active Admin, is it possible to add a checkbox to each item in an index page (this isn't hard), and add some kind of menu to perform bulk actions on all selected items, like delete all selected items at once.
I can't find an other way to do this than to create a custom page, but I'd rather not do that; seems like overkill to me.
By default, the index page provides you a “Batch Action” to quickly delete records, as well as an API for you to easily create your own. Note that if you override the default index, you must add selectable_column back for batch actions to be usable: index do selectable_column # ... end.
Active Admin is a Ruby on Rails plugin for generating administration style interfaces. It abstracts common business application patterns to make it simple for developers to implement beautiful and elegant interfaces with very little effort.
It works using the mentioned branch, but not on a custom panel, from what I'm seeing.
We have it working on an index:
index do
selectable_column
column :id
column :name
But can't make it work on a show:
panel "Children - Process Nodes" do
text_node link_to "New", new_admin_process_node_path(:parent_id => department_node.id)
unless department_node.children.empty?
table_for department_node.children do
column :id
column :name
selectable_column inside table_for doesn't seem to work.
undefined local variable or method `selectable_column' for #
Any idea?
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With