Skip to content

Instantly share code, notes, and snippets.

@maecha
Created May 11, 2017 07:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maecha/2a2c2727c7d9c501079435732110661f to your computer and use it in GitHub Desktop.
Save maecha/2a2c2727c7d9c501079435732110661f to your computer and use it in GitHub Desktop.
radio button with label
<div class="form-check form-check-inline">
<%= f.collection_radio_buttons(:hoge_id, @hoges, :id, :name) do |b| %>
<%= b.label(class: 'form-check-label', 'data-value': b.value) { b.radio_button(class: 'form-check-input') + b.text } %>
<% end %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment