Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%= form_for(@sundae) do |f| %>
- <!--
- collection_check_boxes requires 4 parameters, the last two are methods that access
- the value and text from the collection, respectively. Hence the need for
- SundaesHelper.valid_flavors!
- -->
- <%= f.collection_check_boxes(:flavor_list, valid_flavors, :first, :first) do |b| %>
- <!-- FYI: I use Bootstrap 4, so I customized how the checkboxes would render -->
- <div class="form-check">
- <label class="form-check-label"><%= b.check_box class: 'form-check-input' %> <%= b.value %></label>
- </div>
- <% end %>
- <%= f.submit %>
- <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement