mercredi 23 mars 2016

Unable to save multiple values using checkboxes for rails

I have an array, say supposedly [3, 4, 5, 6, 7, 8, 9, 10, 11, 12], that represent the grade value. In my form for creating a group, the group can have multiple grade values. I want to implement this using checkbox in the form where user can select multiple grade for a group created via checkboxes.

I have seen a solution as described in this link.

The first way suggested doesnot work.

The second way described in the link above involves creating a new database table with a HABTM relationship. I am not very keen in creating a new table only for these values which probably might not change.

Please suggest a way. Your help is much appreciated. Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire