forked from activeadmin/activeadmin
-
Notifications
You must be signed in to change notification settings - Fork 4
Add a menu entry for a collection action
simonc edited this page Jan 31, 2012
·
1 revision
You defined a custom collection action for a resource like this:
ActiveAdmin.register Article do
collection_action :stats do
# stats stuff
end
end
And now you want to add a menu entry for that page. To do so you need to use the action_item
.
ActiveAdmin.register Article do
action_item { link_to "Stats", stats_admin_articles_path }
collection_action :stats do
# stats stuff
end
end
Warning: This works only for collection actions and adding member actions links should be done in the index page or any page but not in the menu.