Sha256: 5354606b988e4fedb804d8c43aedfaa935a492b3396c1be2a6a7dcbd1d65a02c
Contents?: true
Size: 544 Bytes
Versions: 5
Compression:
Stored size: 544 Bytes
Contents
module Geri module AdminHelper def current_path?(path) url_for(overwrite_params: nil) == path end def sidebar_link(name, path, icon=nil) html_options= {} html_options[:class] = 'active' if current_path?(path) content_tag(:li, html_options) 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 end end
Version data entries
5 entries across 5 versions & 1 rubygems