Retrospring/app/helpers/application_helper.rb

19 lines
297 B
Ruby
Raw Normal View History

2014-08-01 02:23:47 -07:00
module ApplicationHelper
2014-11-02 04:47:35 -08:00
def nav_entry(body, path)
content_tag(:li, link_to(body, path), class: ('active' if current_page? path))
2014-08-01 06:27:08 -07:00
end
##
#
def bootstrap_color c
case c
when "error", "alert"
"danger"
when "notice"
"info"
else
c
end
end
2014-08-01 02:23:47 -07:00
end