When you have other types of inputs inside the same div, they will be wrapped as well, which has an undesired effect on the look. This happens for example in rails views where you use the "check_box" method which creates an input as well as a hidden field for the off value. By making sure that only inpu:checkbox is returned, all non checkbox inputs are left untouched.
make sure input is a checkbox tp prevent other inputs (and hidden one…
…s) are not also wrapped.