Skip to content

How To Disable A Resource Page Menu Item

jpmckinney edited this page Jul 1, 2012 · 3 revisions

There may be an instance where you would want to have a resource generated for your model, but might not currently want an navigation menu item displaying for it.

Here is how you would address that specific issue:

ActiveAdmin.register ClassName do
    menu false
end

To conditionally disable a menu (for example, if you use CanCan):

ActiveAdmin.register ClassName do
  menu :if => proc{ can? :manage, ClassName }
end
Clone this wiki locally