Skip to content

Instantly share code, notes, and snippets.

@DevGW
Created December 29, 2022 13:44
Show Gist options
  • Save DevGW/9f164720859caf3fa7173ec0f176c927 to your computer and use it in GitHub Desktop.
Save DevGW/9f164720859caf3fa7173ec0f176c927 to your computer and use it in GitHub Desktop.
Ruby / Rails :: form - radio buttons
<div class="field">
<%= f.label :VAR, class: "" %><br />
<%= f.radio_button :VAR, true, class: "" %>
<%= f.label :VAR, "On", :value => "true", class: "" %>
<%= f.radio_button :VAR, false, :checked => true, class: "" %>
<%= f.label :VAR, "Off", :value => "false", class: "" %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment