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.addcurrentusertomenu menu
admin.addlogoutbuttonto_menu menu
end
end
Written by MaverickRolex
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Activeadmin
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#