Module: BootstrapRailsFlash::BootstrapHelper
- Included in:
- ApplicationHelper
- Defined in:
- lib/bootstrap_rails_flash/bootstrap_helper.rb
Instance Method Summary collapse
-
#bootstrap_class_for(flash_type) ⇒ Object
Return Bootstrap class type for flash type.
Instance Method Details
#bootstrap_class_for(flash_type) ⇒ Object
Return Bootstrap class type for flash type
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bootstrap_rails_flash/bootstrap_helper.rb', line 5 def bootstrap_class_for(flash_type) case flash_type when 'success' 'alert-success' # Green when 'error' 'alert-danger' # Red when 'alert' 'alert-warning' # Yellow when 'notice' 'alert-info' # Blue else flash_type.to_s end end |