Class: Spark::NavMenuHelper::NavMenu
- Inherits:
-
MenuHelper::Menu
- Object
- SparkEngine::BlockHelper
- Helper
- MenuHelper::Menu
- Spark::NavMenuHelper::NavMenu
- Defined in:
- app/helpers/spark/nav_menu_helper.rb
Constant Summary
Constants inherited from MenuHelper::Menu
Instance Method Summary collapse
-
#initialize(title = nil, options = {}) ⇒ NavMenu
constructor
A new instance of NavMenu.
- #more(content = nil, url = nil, options = nil, &block) ⇒ Object
Methods inherited from MenuHelper::Menu
#display, #group, #header, #item, #link
Constructor Details
#initialize(title = nil, options = {}) ⇒ NavMenu
Returns a new instance of NavMenu.
9 10 11 12 13 14 15 |
# File 'app/helpers/spark/nav_menu_helper.rb', line 9 def initialize( title = nil, = {} ) config({ tag: :nav, base_class: 'nav-menu' }) super( title, ) end |
Instance Method Details
#more(content = nil, url = nil, options = nil, &block) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'app/helpers/spark/nav_menu_helper.rb', line 17 def more( content=nil, url=nil, =nil, &block ) content, url, = parse_item_args( content, url, , &block) ['aria-haspopup'] = 'true' = add_class( , config[:base_class] + "-more" ) url ||= '#' item( content, url, ) end |