I am using RoR and I am using the Simple_Form gem for my forms. I have an object relation whereby a User can have multiple Roles, and during creation, the admin can select
According to the doc of collection_check_boxes, there is an option item_wrapper_class
to give a css class to the span containing the checkbox. Use it like that
<%= f.collection_check_boxes :role_ids, Role.all, :id, :name, :item_wrapper_class => 'checkbox_container' %>
And a CSS style to keep the checkbox and the label on the same line:
.checkbox_container input {
display: inline;
}