Sha256: 6299d13ec209bf9482a46f1ec6e7bade603698e441bcb99915fd9ed6fbf8c915
Contents?: true
Size: 643 Bytes
Versions: 3
Compression:
Stored size: 643 Bytes
Contents
module WebAdmin module ApplicationHelper def menu_link(text, icon, link, route) recognized = Engine.routes.recognize_path(link) if recognized[:controller] == params[:controller] && recognized[:action] == params[:action] content_tag(:li, :class => "active") do link_to(route) do content_tag(:i,"", :class => "#{icon} icon-xlarge") + content_tag(:span, text) end end else content_tag(:li) do link_to(route) do content_tag(:i,"", :class => "#{icon} icon-xlarge") + content_tag(:span, text) end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
web_admin-0.1.0 | app/helpers/web_admin/application_helper.rb |
web_admin-0.0.2 | app/helpers/web_admin/application_helper.rb |
web_admin-0.0.1 | app/helpers/web_admin/application_helper.rb |