2015-12-11 15:26:51 -05:00
|
|
|
# helpers/application_helper.rb
|
2015-07-08 10:24:41 -04:00
|
|
|
module ApplicationHelper
|
2015-07-10 15:20:46 -04:00
|
|
|
def bootstrap_class_for(flash_type)
|
|
|
|
bootstrap_classes[flash_type] || flash_type.to_s
|
|
|
|
end
|
|
|
|
|
2015-08-06 16:31:08 -04:00
|
|
|
def page_header
|
|
|
|
content_for(:title) || ''
|
|
|
|
end
|
|
|
|
|
2015-07-10 15:20:46 -04:00
|
|
|
private
|
|
|
|
|
|
|
|
def bootstrap_classes
|
2015-07-16 11:57:27 -04:00
|
|
|
{
|
|
|
|
'alert' => 'alert-warning',
|
|
|
|
'error' => 'alert-danger',
|
|
|
|
'notice' => 'alert-info',
|
|
|
|
'success' => 'alert-success'
|
|
|
|
}
|
|
|
|
end
|
2015-07-08 10:24:41 -04:00
|
|
|
end
|