Module: StandardView::FlashHelper
- Defined in:
- app/helpers/standard_view/flash_helper.rb
Constant Summary collapse
- ALERT_CLASSES_BY_FLASH_TYPE =
{ success: "alert-success", error: "alert-danger", alert: "alert-warning", notice: "alert-info", }.freeze
Instance Method Summary collapse
Instance Method Details
#alert_class_for_flash(flash_type) ⇒ Object
12 13 14 |
# File 'app/helpers/standard_view/flash_helper.rb', line 12 def alert_class_for_flash(flash_type) ALERT_CLASSES_BY_FLASH_TYPE.fetch(flash_type.to_sym, flash_type.to_s) end |