新手问题 关于 Rails Controller params 的参数内容

chareice · May 29, 2015 · Last by cassiuschen replied at May 29, 2015 · 2043 hits

前端使用 Angular Resource 传参数进来,本来是没有 operation_user 这个参数的。

传到后台之后多出了 operation_user 这个对象。

I, [2015-05-29T14:48:46.876009 #29335]  INFO -- :   Parameters: {"username"=>"12321312", "phone_number"=>"3123123", "name"=>"123123", "password"=>"[FILTERED]", "operation_user_role_ids"=>["1"], "operation_user"=>{"username"=>"12321312", "phone_number"=>"3123123", "name"=>"123123"}}

关键是

"operation_user"=>{"username"=>"12321312", "phone_number"=>"3123123", "name"=>"123123"}

多出的这个参数里面没有 password 和 operation_user_role_ids 这两个 key...

请问各位大神是何原因?

rake middleware 结果打印出来看看?

你能贴一下 Gemfile 么…感觉是装了什么 gem…

You need to Sign in before reply, if you don't have an account, please Sign up first.