Sha256: d2c2f337488162f6c5c6b54c08df02e9d6fbf87b4814f235848c4e01c985189c
Contents?: true
Size: 525 Bytes
Versions: 15
Compression:
Stored size: 525 Bytes
Contents
module NavHelper def nav_link(page, &link_text) class_name = request.env['PATH_INFO'].match(page) ? 'active' : nil content_tag(:li, class: class_name) do link_to page do link_text.call end end end def treeview_link(text, &links) content = link_to('#') do content_tag(:span, text) << content_tag(:i, '', class: "fa pull-right fa-angle-left") end content << content_tag(:ul, class: 'treeview-menu') do links.call end content_tag :li, class: 'treeview' do content end end end
Version data entries
15 entries across 15 versions & 1 rubygems