Method: RsMenu#render_with_subs
- Defined in:
- app/controllers/concerns/rs_menu.rb
#render_with_subs(items, primary, item) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/concerns/rs_menu.rb', line 7 def render_with_subs(items, primary, item) subs = items.select { |i| i.parent_id == item.id && !i.name.blank? && i.enabled } if subs.empty? block = nil else block = Proc.new do |sub_nav| subs.each { |sub| render_with_subs(items, sub_nav, sub) } end end cr = item.clean_regexp (primary, item, block) end |