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.
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.