x = "SomeClass".classify.constantize.new(params)
>> how can i get the params whitelisted? thank you!
x = "SomeClass".classify.constantize.new(params)
>> how can i get the params whitelisted? thank you!
This shouldn't make any difference to how you whitelist the params - what problems are you having?
Fred
hi the problem is my update method:
@rec.update(params[:rec].require(@form.sourcetable.singularize.parameterize.underscore.to_sym).permit!)
→
and here is the params hash:
{"utf8"=>"✓",
"_method"=>"patch",
"authenticity_token"=>"GNgGZsqKQgZOcKvGV2pn/sdQ+C/EAqTmQO/bt93cGmo=",
"rec"=>{"id"=>"3",
"name"=>"3334",
"company_id"=>"",
"created_at"=>"2015-04-21 13:48:17 UTC",
"updated_at"=>"2015-04-21 13:48:17 UTC",
"no"=>"",
"address"=>"",
"address_2"=>"", .........