Module: FlasheeHelper
- Defined in:
- lib/templates/flashee_helper.rb,
lib/templates/flashee_bulma_helper.rb,
lib/templates/flashee_bootstrap_helper.rb,
lib/templates/flashee_foundation_helper.rb
Instance Method Summary collapse
-
#flashee_for(flash_type) ⇒ Object
Called by the
_flash_messages.html.erbpartial to drop-in the css class that matches the value of:typeon the flash message.
Instance Method Details
#flashee_for(flash_type) ⇒ Object
Called by the _flash_messages.html.erb partial to drop-in the css class that matches the value of :type on the flash message.
Parameters:
- flash_type
-
A symbol or string that is passed from the flash messages
typeattribute
Returns:
A string for the css class
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/templates/flashee_helper.rb', line 12 def flashee_for flash_type case flash_type.to_s when "success" "success" when "error" "error" when "alert" "alert" else flash_type.to_s end end |