Skip to content

Instantly share code, notes, and snippets.

@osulyanov
Created May 8, 2017 08:58
Show Gist options
  • Save osulyanov/91788341e1a796021b164f719677a1d1 to your computer and use it in GitHub Desktop.
Save osulyanov/91788341e1a796021b164f719677a1d1 to your computer and use it in GitHub Desktop.
ActiveAdmin custom menu links
# config/initializers/active_admin.rb
ActiveAdmin.setup do |config|
config.namespace :admin do |admin|
admin.build_menu do |menu|
menu.add :label => "The Application", :url => "/", :priority => 0
menu.add :label => "Sites" do |sites|
sites.add :label => "Google", :url => "http://google.com", :html_options => { :target => :blank }
sites.add :label => "Facebook", :url => "http://facebook.com"
sites.add :label => "Github", :url => "http://github.com"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment