How to set a parent menu priority in ActiveAdmin?

activeadmin, ruby, ruby-on-rails

Solution

The items, which non model-based starts their priority from 10, so u can put 10+ priority for model-based menus. If you need to set priorities among non model-based menus, you can build fake file under admin folder like admin/administration.rb with code:

ActiveAdmin.register_page "Administration" do
  menu :label => "Administration", :priority => 15, :url => '#'
end

and admin/bundle.rb:

ActiveAdmin.register_page "Bundle" do
  menu :label => "Bundle", :priority => 16, :url => '#'
end

so on

Problem

I have a couple of models in my Ruby on Rails application like "Plan", "Tester", "Module", etc. Using activeadmin gem, I would like to have a page for each of these entities and place each under a couple of different menus. So my code looks like the following: ``` ActiveAdmin.register Plan do menu parent: 'Planning', priority: 1 ActiveAdmin.register Tester do menu parent: 'Planning', priority: 2 ActiveAdmin.register Module do menu parent: 'Bundle', priority: 1 ActiveAdmin.register User do menu parent: 'Administration', priority: 1 ``` I don't have a page for the top menus ('Planning', 'Bundle', 'Administration'), but I want to see them in a custom order and not the alphabetical order. So, my question is how could I set the priority (order) of the parent menus without having a corresponding page for each of them?

Original source