public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5
def merge_json_params
body = request.body.read
request.body.rewind
params.merge!(ActiveSupport::JSON.decode(body)) if body != "" && request.format.json?
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.