Module: Merrymenu::Helper
- Defined in:
- lib/merrymenu/view_helper.rb
Instance Method Summary collapse
Instance Method Details
#render_menu(name = "menu", options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/merrymenu/view_helper.rb', line 4 def (name="menu", ={}) = .symbolize_keys.reverse_merge!(:class => name) = Merrymenu::Builder.[name] return "" if .nil? tabs_html = "" .each do |tab| tabs_html << content_tag(:div, render_tab(tab), :class => tab_classes(tab)) if permit?(tab) end container_html = content_tag(:div, tabs_html.html_safe, :class => 'tabs') = content_tag(:div, container_html, :class => [:class]) end |