我正在使用主干从客户端更新模型,在服务器端我正在检索双重参数:
{"_id"=>"5209df7c2e21a971fd000002",
"name"=>"Gary Miller",
"email"=>"gary.miller@att.net",
"last_login"=>"2013-03-18T20:37:53+00:00",
"timezone"=>"Central Time (US & Canada)",
"mobile"=>nil,
"address"=>nil,
"address_attributes"=>{},
"action"=>"update",
"controller"=>"users",
"id"=>"5209df7c2e21a971fd000002",
"user"=>
{"_id"=>"5209df7c2e21a971fd000002",
"email"=>"gary.miller@att.net",
"name"=>"Gary Miller",
"last_login"=>"2013-03-18T20:37:53+00:00",
"timezone"=>"Central Time (US & Canada)",
"mobile"=>nil}}
在网络检查器的客户端,我检查了有效负载,这是客户端发送的数据:
_id: "5209df7c2e21a971fd000002"
address: null
address_attributes: {}
email: "gary.miller@att.net"
last_login: "2013-03-18T20:37:53+00:00"
mobile: null
name: "Gary Miller"
timezone: "Central Time (US & Canada)"
双参数的事情困扰着我。因此,欢迎任何解决的想法。