業務ではAPIばかりやっていたので、いざrailsのテンプレートを使おうとしたら、
すごく戸惑ってしまいました

結論としては、do で囲ってあげればできるとわかりました

<%= f.label :terms_of_service do %>
  <%= f.check_box :terms_of_service %>
  I agree to the <%= link_to 'Terms of Service', policies_path %>.
<% end %>

参考にした記事

How to keep a checkbox and label on the same line in a Rails form?

コメントをどうぞ

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

CAPTCHA