What should I do to keep the label of a checkbox on the same line with the checkbox in a rails view containing a form?
Currently the label goes on the next line:
<
I would wrap the check box inside the label.
<%= f.label :terms_of_service do %>
<%= f.check_box :terms_of_service %>
I agree to the <%= link_to 'Terms of Service', policies_path %>
<% end %>
When the input field is wrapped by it's label, you actually don't need the for attribute on the label. The label will activate the check box without it on click. So even simpler:
Generically for Rails, this could be a way to go about it (human_attribute_name works with i18n):