Module: Tenon::FlashHelper
- Defined in:
- app/helpers/tenon/flash_helper.rb
Instance Method Summary collapse
Instance Method Details
#flash_messages ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/tenon/flash_helper.rb', line 3 def = [] %w(notice alert warning error).each do |msg| unless flash[msg.to_sym].blank? content = content_tag(:div, flash[msg.to_sym], class: 'flash__message') << content_tag(:div, content, class: "flash flash--#{msg}") end end .join('').html_safe end |