Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top