Skip to content

Commit

Permalink
make sure to delete :pretty option so it doesn't persist when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
kornypoet committed Mar 10, 2014
1 parent 6ea70fd commit 83d3a99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/goliath/chimp/rack/formatters/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class JSON
include Goliath::Rack::AsyncMiddleware

def post_process(env, status, headers, body)
pretty = !!env['params']['pretty'] rescue false
pretty = !!env['params'].delete('pretty') rescue false
if json_response? headers
body = MultiJson.dump(body, pretty: pretty)
end
Expand Down

0 comments on commit 83d3a99

Please sign in to comment.