0
我的形式向外发送数据,如如何转换强劲参数轨道4
{"utf8"=>"✓",
"authenticity_token"=>"",
"org_document"=>{"is_fin_changed"=>"Y"},
"commit"=>"Save",
"document_type"=>"FIN_CART"}
所以,我写强参数一样
def req_document_params
params.fetch(:org_document,{}).permit(:document_type,:is_fin_changed)
end
但它仅发送{"is_fin_changed"=>"Y"}
不知道什么是错的! 任何帮助表示赞赏:)
别你看到'document_type'超出'org_document'参数吗?显示与该请求相关的代码。 –
我给出了与请求相关的代码。不知道如何包含':document_type' – learner2017
为什么人们把-1投为建设性问题。你不觉得那个作者只有一个名声吗?而不是把答案投下来:/ –