我有一個嵌套窗體,並嘗試使用update_attributes來更新它,但它似乎不起作用。我正在使用導軌2.3.8嵌套窗體上的update_attributes不起作用
你能幫忙嗎?
Aanu
添加一些代碼
控制器代碼:
update
@app.update_attributes(params[:application])
end
@_params:
{"authenticity_token"=>"AdSr8o51u7GfnOwLSpEOe5xAPINd7ImxDpuayPk12No=", "_method"=>"put", "action"=>"update", "id"=>"10006", "stype"=>"Save",
"application"=>{
"contact_attributes"=>{"city"=>"Denver", "address"=>"7000 Drive", "zip"=>"22222", "first_name"=>"Randy"}, "details_attributes"=>{
"2"=>{ "coverage"=>"false", "same_fee"=>"true", "fee_rate"=>"2000", "id"=>"10018", "year_estabilished"=>"2005"}
}}
}
爲了得到幫助,請顯示一些代碼。 – Gerry
增加了一些代碼 – Aanu