Browse files

new MultiJson syntax - #load instead of #decode

  • Loading branch information...
1 parent 0de0af0 commit 04de14fe863ca965d22e6825df3b2d46debb7a6e @seamusabshere committed May 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rack/contrib/post_body_content_type_parser.rb
View
2 lib/rack/contrib/post_body_content_type_parser.rb
@@ -26,7 +26,7 @@ def initialize(app)
def call(env)
if Rack::Request.new(env).media_type == APPLICATION_JSON && (body = env[POST_BODY].read).length != 0
- env.update(FORM_HASH => MultiJson.decode(body), FORM_INPUT => env[POST_BODY])
+ env.update(FORM_HASH => MultiJson.load(body), FORM_INPUT => env[POST_BODY])
end
@app.call(env)
end

0 comments on commit 04de14f

Please sign in to comment.