Search code examples
ruby-on-railsruby-on-rails-4activeadmin

how to change the text of navbar link in activeadmin


How can I replace the Link text on active-admin navbar for a model?

I have a model: OpportunityConsultantPairing, which I'm registering in active-admin as follow:

ActiveAdmin.register OpportunityConsultantPairing do

  controller do
    before_filter { @page_title = "Project Pairings" }
  end

end

setting @page_title only changes the Title, what I want to do however is to change both the title, as well as the navbar-link text as shown below:

enter image description here

How can one go about this? thank you.


Solution

  • Try this

    ActiveAdmin.register OpportunityConsultantPairing do
     menu label: "Project Pairings"
    
      controller do
        before_filter { @page_title = "Project Pairings" }
      end
    
    end
    

    for more info check here:- http://activeadmin.info/docs/2-resource-customization.html