Module: FlashHelper
- Defined in:
- app/helpers/flash_helper.rb
Instance Method Summary collapse
Instance Method Details
#flash_helper ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'app/helpers/flash_helper.rb', line 2 def flash_helper markup = flash.map do |name, msg| content_tag :div, class: "flash alert alert-#{flash_type_to_class(name)} alert-dismissable", role: 'alert' do render partial: 'shared/flash', locals: { message: msg, type: flash_type_to_class(name) } end end flash.clear markup.join.html_safe end |