module Interage::FlashMessageHelper

Public Instance Methods

flash_messages() click to toggle source
# File lib/interage/flash_message_helper.rb, line 5
def flash_messages
  messages ||= flashes.map do |type, message|
    bootstrap_alert(handle_type(type), message)
  end

  safe_join(messages || [])
end
flashes() click to toggle source
# File lib/interage/flash_message_helper.rb, line 13
def flashes
  flash.to_h.symbolize_keys
end
handle_type(type) click to toggle source
# File lib/interage/flash_message_helper.rb, line 17
def handle_type(type)
  type == :notice ? :success : type
end