What is the best way to add a global navigation item to Active Admin in Rails 3

I am trying to add a global navigation menu item to my Active Admin installation (next to the "Dashboard" navigation button). Active Admin says that this is possible on their website, but they do not have documentation on how to achieve it. Does anyone know how to do this?

EDIT: Sorry, I should have been more clear. I want to add a link to the global navigation, consisting of an arbitrary pair of "text / link". IE, if I wanted to add a link to http://google.com with the text β€œGoogle” in the global navigation of the active administrator, how would I do it?

+6
source share
2 answers
ActiveAdmin.register_page "Google" do menu :priority => 1, :label => 'Google' , :url => 'http://google.com' end 
+3
source

Only for ActiveAdmin versions <= 0.4 :: Reading the source of the TabbedNavigation class seems to be not easy. If relying on javascript and jquery does not bother you, you can put something like this in application.js:

 $(document).ready(function(){ $('#dashboard').parent().append('<li><a href="http://www.google.com/">Google</a></li>'); }); 

Where do they claim it is possible?

-1
source

Source: https://habr.com/ru/post/905746/


All Articles