I have a check box on a rails form like this:
.columns.small-1
= f.label :private
= f.check_box :private
if the box is unchecked, the form sends correctly with one value passed. If the box is checked the form sends the same field twice with one value as 0 and one as 1, which is causing the box to always show as unchecked" and have a value of 0. Been researching hidden fields in rails but not sure how to apply to this problem.
Aucun commentaire:
Enregistrer un commentaire