1
0
Fork 0
find-us-lunch/app/helpers/application_helper.rb
2014-10-27 11:16:10 -04:00

20 lines
405 B
Ruby

module ApplicationHelper
def bootstrap_class_for(flash_type)
bootstrap_classes[flash_type] || flash_type.to_s
end
def glyph(icon)
content_tag(:i, class: "glyphicon glyphicon-#{icon}") {}
end
private
def bootstrap_classes
{
'alert' => 'alert-warning',
'error' => 'alert-danger',
'notice' => 'alert-info',
'success' => 'alert-success'
}
end
end