class ActiveAdmin::Views::Menu

Renders an ActiveAdmin::Menu as a set of unordered list items.

This component takes cares of deciding which items should be displayed given the current context and renders them appropriately.

The entire component is rendered within one ul element.

Attributes

menu[R]

Public Instance Methods

build(menu, options = {}) click to toggle source

@param [ActiveAdmin::Menu] menu the Menu to render @param [Hash] options the options as passed to the underlying ul element.

Calls superclass method
# File lib/active_admin/views/components/menu.rb, line 17
def build(menu, options = {})
  @menu = menu
  super(options)

  menu.items.each do |item|
    menu_item(item) if helpers.render_in_context self, item.should_display
  end
  children.sort!
end
tag_name() click to toggle source
# File lib/active_admin/views/components/menu.rb, line 27
def tag_name
  'ul'
end