jeudi 4 août 2016

Why in Rails when checkbox saving, just last element saved correctly

With Form_for:

- @questions.each do |secret_question|      

= f.check_box :question, {multiple: true}, question.id, 0
= f.label     :question, question.body

While saving, if I've checked last element - in base saved right value,

but if I've checked others elements (from first till penultimate) - in base saved '0'

What is wrong? Thank you




Aucun commentaire:

Enregistrer un commentaire