Sha256: f71c2f10e1cfdedf0be41543acebb58977569e4056b52e447e1fd05ce3940820
Contents?: true
Size: 326 Bytes
Versions: 6
Compression:
Stored size: 326 Bytes
Contents
module ApplicationHelper def nested_nav(pages) pages.map do |page, sub_pages| html = content_tag(:div, link_to(page.title, page.url) , :class => "indent") html += content_tag(:div, nested_nav(sub_pages), :class => "indent") unless sub_pages.blank? html end.join.html_safe end end
Version data entries
6 entries across 6 versions & 1 rubygems