Sha256: f698a690bfb7f182210bc3d17894a16a3483549f403afc337365cdf1509cbb09
Contents?: true
Size: 326 Bytes
Versions: 3
Compression:
Stored size: 326 Bytes
Contents
module MenuMaker class CustomSubmenuRenderer < MenuRenderer render do output = build_menu do |item| options = { link: { class: 'active' } } if item.path == current_path h.li(item.title, item.path, options || {}) end h.content_tag(:ul, output, class: 'dropdown-menu') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
menu_maker-0.1.0 | lib/menu_maker/custom_submenu_renderer.rb |
menu_maker-0.0.4 | lib/menu_maker/custom_submenu_renderer.rb |
menu_maker-0.0.3 | lib/menu_maker/custom_submenu_renderer.rb |