Class: ActiveAdmin::Menu

Inherits:
Object
  • Object
show all
Includes:
MenuNode
Defined in:
lib/active_admin/menu.rb

Overview

Each Namespace builds up it’s own menu as the global navigation

To build a new menu:

menu = Menu.new do |m|
  m.add label: 'Dashboard', url: '/'
  m.add label: 'Users',     url: '/users'
end

If you’re interested in configuring a menu item, take a look at the options available in ‘ActiveAdmin::MenuItem`

Defined Under Namespace

Modules: MenuNode

Instance Attribute Summary

Attributes included from MenuNode

#children

Instance Method Summary collapse

Methods included from MenuNode

#[], #[]=, #add, #current?, #include?, #items

Constructor Details

#initialize {|_self| ... } ⇒ Menu

Returns a new instance of Menu.

Yields:

  • (_self)

Yield Parameters:



18
19
20
21
# File 'lib/active_admin/menu.rb', line 18

def initialize
  super # MenuNode
  yield(self) if block_given?
end