forked from activeadmin/activeadmin
-
Couldn't load subscription status.
- Fork 0
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
endAnd 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
endWarning: 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.