Skip to content

CheckBoxesInput doesn't select/disable correct options #791

SaschaKonietzke opened this Issue Feb 3, 2012 · 3 comments

2 participants


Somehow the make_selected_values and checked?/disabled? methods in Formtastic::Inputs::CheckBoxesInput don't play together anymore. The form element renders, but the previously selected options are no longer selected.


@SaschaKonietzke can you provide me with any more detail about the model, the type of collection, the options you're using on the input method, etc so that I can try to narrow this down and make a test? Also, I assume this is with 2.1.0.beta or master?


I managed to get this to work. This happened with a MongoMapper model and an embedded to-many-association on the master branch.

It didn't work when I used IDs and a custom collection:

f.input :role_ids, :as => :check_boxes, :collection => [ {'Role Name 1' => BSON::ObjectId('123'} ]

When changing to the association with real objects it is working again:

f.input :roles, :as => :check_boxes, :collection => @available_role_objects


Okay thanks, closing for now, but if there's a change that we need to make or something we can improve, would love to hear about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.