1qssca
Last Updated: August 23, 2017
·
18
· MaverickRolex
Logo

Add items to Active Admin menu

This block of code allows us to add items in the Active Admin dynamic menu without needing to add it as a gem resource, we can also add manually generated paths in the routes.rb file

This code should be put at the end of the file:
Config / initializers / active_admin.rb

config.namespace :admin do |admin|
admin.buildmenu :utilitynavigation do |menu|
menu.add label: "Storage", url: Rails.application.routes.urlhelpers.storagespath
menu.add label: "Transferences", url: Rails.application.routes.urlhelpers.itemtransferspath
admin.add
currentusertomenu menu
admin.add
logoutbuttonto_menu menu
end
end

Say Thanks
Respond
Awesome Job

B6c77ad0 c95b 11e7 8263 8f89080b8db6
Ruby Developer Backend
·
Austria (Vienna or Linz)
·
Full Time