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

Lists in Python -

android - can not access to progress bar in an other activity -

java - Vaadin 7 Pass Data Between Views -