Module: Geri::AdminHelper
- Defined in:
- app/helpers/geri/admin_helper.rb
Instance Method Summary collapse
Instance Method Details
#current_path?(path) ⇒ Boolean
4 5 6 |
# File 'app/helpers/geri/admin_helper.rb', line 4 def current_path?(path) url_for(overwrite_params: nil) == path end |
#sidebar_link(name, path, icon = nil) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/helpers/geri/admin_helper.rb', line 8 def (name, path, icon=nil) = {} [:class] = 'active' if current_path?(path) content_tag(:li, ) do content = '' if icon content << content_tag(:i, '', class: "fa fa-#{icon}") end content = link_to(path) do content.html_safe + content_tag(:span, name) end content end end |