Class: ActiveAdmin::Views::TabbedNavigation
- Defined in:
- lib/active_admin/views/tabbed_navigation.rb
Overview
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.
Instance Attribute Summary collapse
-
#menu ⇒ Object
readonly
Returns the value of attribute menu.
Instance Method Summary collapse
-
#build(menu, options = {}) ⇒ Object
Build a new tabbed navigation component.
-
#menu_items ⇒ Object
Returns the first level menu items to display.
- #tag_name ⇒ Object
Methods inherited from Component
#default_class_name, #initialize
Constructor Details
This class inherits a constructor from ActiveAdmin::Component
Instance Attribute Details
#menu ⇒ Object (readonly)
Returns the value of attribute menu.
12 13 14 |
# File 'lib/active_admin/views/tabbed_navigation.rb', line 12 def @menu end |
Instance Method Details
#build(menu, options = {}) ⇒ Object
Build a new tabbed navigation component.
19 20 21 22 23 |
# File 'lib/active_admin/views/tabbed_navigation.rb', line 19 def build(, = {}) @menu = super(.merge()) end |
#menu_items ⇒ Object
Returns the first level menu items to display
26 27 28 |
# File 'lib/active_admin/views/tabbed_navigation.rb', line 26 def displayable_items(.items) end |
#tag_name ⇒ Object
30 31 32 |
# File 'lib/active_admin/views/tabbed_navigation.rb', line 30 def tag_name 'ul' end |