问题
I know this was supposed to be fixed in Formtastic 2.0 but for some reason, this isn't working for me.
<%= f.input :gender, :as => :check_boxes, :collection => ["Male", "Female", "Unisex"] %>
Whenever I go back and check it, the items is always unchecked again. It never appears as selected. I know Justin French commented about it here, but I am not sure what it means or how that can help me fix the problem.
I am saving gender as a string in the User model if it makes a difference.
I am also using it with formtastic-bootstrap 1.1.1
Thank you!
来源:https://stackoverflow.com/questions/9727890/formtastic-check-boxes-using-collection-not-saving-checked-items-in-edit-form