Domanda

I am working with Rails 4 and MongoMapper and trying to get my checkbox answer from my form to show up in my database.

"<%= f.check_box(:assign, {}, "Office", "Classroom") %>

This is one example of the three options that I am trying to make available but I am only getting assign[ ] in the database despite having checked things off in the form. What am I missing to make this work?

È stato utile?

Soluzione

The checkboxes might override each other, try putting them in another array.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top