Pass value to generic_label when creating multi select checkboxes
When { multiple: true } option is passed to check_box it suffixes the input's id attribute value with checked_value. For example: f.check_box(:pets, { multiple: true}, 'dog') => <input type="checkbox" id="user_pets_dog" name="user[pets][]" value="dog" /> Previous implementation does not pass in a value parameter to generic_label so the resulting label tag has the incorrect for attribute value. This makes the resulting checkboxes un-checkable. Now, when checkbox_options is set to { multiple: true } we pass in checked_value as value param to generic_label to create labels with correct for attribute values.
Showing
Please register or sign in to comment