Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

belongs_to changes header in activeadmin

I have a model names goods that can have assets. The assets can be accessed via the sidebar:

Goods Model

For reasons I do not know does the menu change, when i enter the assets section:

enter image description here

I want the menu to be the same, no matter where the user is. It's my navigation bar.

Is this a bug or a feature? Can I change the behaviour?

like image 332
shredding Avatar asked Sep 17 '13 13:09

shredding


1 Answers

The solution to this I found was simple and was actually documented in the official documentation. All you need to do is to add navigagion_menu :default to your resource.

Like so

ActiveAdmin.register Asset do
  menu false
  belongs_to :good
  navigation_menu :default
end
like image 57
Michael Yagudaev Avatar answered Oct 21 '22 12:10

Michael Yagudaev