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
The top-level menu items that should be displayed.
- #tag_name ⇒ Object
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
The top-level menu items that should be displayed.
26 27 28 |
# File 'lib/active_admin/views/tabbed_navigation.rb', line 26 def .items(self) end |
#tag_name ⇒ Object
30 31 32 |
# File 'lib/active_admin/views/tabbed_navigation.rb', line 30 def tag_name 'ul' end |