2017-02-23 92 views

回答

0

如果您使用的是rails 4及以上版本,則應該使用strong_parameters來允許將白名單參數

Customer.new(customer_params) 

def customer_params 
    params.require(:customer).permit(<list of attributes you want to allow>) 
end 
相關問題