Using old-style Hash literal to work with 1.8.7

This commit is contained in:
Gregor Schmidt 2011-10-10 08:23:26 +02:00
parent d9986bad86
commit 3bbaa6f2de

View File

@ -126,7 +126,7 @@ class MailCatcher::Web < Sinatra::Base
if part = MailCatcher::Mail.message_part_html(id)
# TODO: Server-side cache? Make the browser cache based on message create time? Hmm.
uri = URI.parse("http://api.getfractal.com/api/v2/validate#{"/format/#{params[:format]}" if params[:format].present?}")
response = Net::HTTP.post_form(uri, api_key: "5c463877265251386f516f7428", html: part["body"])
response = Net::HTTP.post_form(uri, :api_key => "5c463877265251386f516f7428", :html => part["body"])
content_type ".#{params[:format]}" if params[:format].present?
body response.body
else