Rails没有解析我对params的请求

时间:2015-07-27 01:43:42

标签: ruby-on-rails json

使用Rails版本4.2.3

邮递员生成的请求:

POST /resources.json HTTP/1.1
Host: xxxx.xx:3000
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 68deca0d-7c6f-0948-cf2c-0f75db4519e6

{ "company": { "name": "acme", "address": "123 Carrot Street" } }

检查params:

{"controller"=>"resources", "action"=>"create", "format"=>"json"}

检查request.body.read:

{ "company": { "name": "acme", "address": "123 Carrot Street" } }

我无法想象这可能出错的地方,请给我一个挖掘的方向

0 个答案:

没有答案