Ruby on Rails:Remove some elements in Strong parameters -


examples: have 4 check boxes boolean values correspond 4 texts : a,b,c,d.
i need push texts checked ( = true ).example
but in default,strong parameters values our form save database, need push 1 of them , not all. need remove text isn't checked in strong parameters . how can ??
know after strong parameters permitted , can not change inside it.
strong parameters in controller:

params.require(:question).permit(:id, :job_id, :content,answers_attributes: [ :id, :content,:result ]) 

(answers nested atribute)


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -