class ActionController::Live::SSE

def perform_write(json, options)

def perform_write(json, options)
  current_options = @options.merge(options).stringify_keys
  PERMITTED_OPTIONS.each do |option_name|
    if (option_value = current_options[option_name])
      @stream.write "#{option_name}: #{option_value}\n"
    end
  end
  message = json.gsub("\n", "\ndata: ")
  @stream.write "data: #{message}\n\n"
end