def notify(type, message, options = {})
      options[:now] ||= false

      # Convert and cleanup.
      type = type.to_s.downcase.to_sym

      # Sanity check for type.
      unless FLASH_TYPES.include?(type)
        raise ArgumentError, "Invalid value for argument type: #{type}, expected one of: #{FLASH_TYPES.to_sentence}."
      end

      logger.info("FLASH (#{options.inspect}) #{type.to_s.upcase}: #{message}")

      if options[:now] == true
        flash.now[type] ||= []
        flash.now[type] << message
      else
        flash[type] ||= []
        flash[type] << message
      end

      logger.debug("DEBUG: FLASH #{flash.inspect}")

      return true
    end
def notify(type, message, options = {})
      options[:now] ||= false

      # Convert and cleanup.
      type = type.to_s.downcase.to_sym

      # Sanity check for type.
      unless FLASH_TYPES.include?(type)
        raise ArgumentError, "Invalid value for argument type: #{type}, expected one of: #{FLASH_TYPES.to_sentence}."
      end

      logger.info("FLASH (#{options.inspect}) #{type.to_s.upcase}: #{message}")

      if options[:now] == true
        flash.now[type] ||= []
        flash.now[type] << message
      else
        flash[type] ||= []
        flash[type] << message
      end

      logger.debug("DEBUG: FLASH #{flash.inspect}")

      return true
    end
Generate a notification message.