Module: FlashHelper
- Defined in:
- lib/ucb_rails_cli/templates/helpers/flash_helper.rb
Constant Summary collapse
- DEFAULT_MAPPING =
{ :notice => :info, :alert => :danger, :error => :danger, }
Instance Method Summary collapse
Instance Method Details
#flash_messages ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/ucb_rails_cli/templates/helpers/flash_helper.rb', line 8 def = flash.map do |type, | content_tag(:div, , class: "alert alert-#{DEFAULT_MAPPING[type.to_sym] || type}", role: "alert") end safe_join(, "\n") end |