9

In rails admin, you can define a navigation label to a model and its children like so:

# in rails_admin.rb

config.model Order do
  navigation_label 'Orders related'
end

config.model OrderProducts do
  parent Order
end

Is there a way to add labels to the navigation menu without creating models (i.e. just for grouping)?

andersonvom
  • 11,701
  • 4
  • 35
  • 40
Samuel G. P.
  • 3,004
  • 2
  • 29
  • 36

1 Answers1

7

According to the wiki, you can append static links to the navigation like so:

RailsAdmin.config do |config|
  config.navigation_static_links = {
    'Google' => 'http://www.google.com'
  }
end

If you're just looking to group them, you can namespace your models under a module, and then you will see your models grouped under the module name in the navigation. Like so: https://i.stack.imgur.com/NMJs2.png

RailsAdmin.config do |config|
  config.model 'Spree::Product' do
    ...
  end
end
RubeOnRails
  • 1,153
  • 11
  • 22