Module: Interage::FlashMessageHelper
- Included in:
- ApplicationHelper
- Defined in:
- lib/interage/flash_message_helper.rb
Instance Method Summary collapse
Instance Method Details
#flash_messages ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/interage/flash_message_helper.rb', line 5 def ||= flashes.map do |type, | bootstrap_alert(handle_type(type), ) end safe_join( || []) end |
#flashes ⇒ Object
13 14 15 |
# File 'lib/interage/flash_message_helper.rb', line 13 def flashes flash.to_h.symbolize_keys end |
#handle_type(type) ⇒ Object
17 18 19 |
# File 'lib/interage/flash_message_helper.rb', line 17 def handle_type(type) type == :notice ? :success : type end |