2014-10-02 16:10:36 -04:00
|
|
|
module ApplicationHelper
|
2014-10-15 13:50:58 -04:00
|
|
|
def bootstrap_class_for(flash_type)
|
|
|
|
bootstrap_classes[flash_type] || flash_type.to_s
|
|
|
|
end
|
|
|
|
|
2014-10-27 11:16:10 -04:00
|
|
|
def glyph(icon)
|
|
|
|
content_tag(:i, class: "glyphicon glyphicon-#{icon}") {}
|
|
|
|
end
|
|
|
|
|
2014-10-15 13:50:58 -04:00
|
|
|
private
|
|
|
|
|
|
|
|
def bootstrap_classes
|
|
|
|
{
|
|
|
|
'alert' => 'alert-warning',
|
|
|
|
'error' => 'alert-danger',
|
|
|
|
'notice' => 'alert-info',
|
|
|
|
'success' => 'alert-success'
|
|
|
|
}
|
|
|
|
end
|
2014-10-02 16:10:36 -04:00
|
|
|
end
|