Forked from JoshReedSchramm/collection_check_boxes.html.erb
Created
January 30, 2017 21:20
-
-
Save wrburgess/44bb83c2a2562c5db87018518c9c5e5f to your computer and use it in GitHub Desktop.
An example of customizing collection_check_boxes in Rails 4. -- I'm working on converting a rails 3.2 app to Rails 4 and noticed that a couple of helpers from simple_form are now in the Rails core. I wanted to move away from dependencies as much as possible including getting rid of simple_form if possible so I went about converting the old view …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= f.collection_check_boxes :venue_ids, Venue.all, :id, :name, checked: Venue.all.map(&:id) do |b| %> | |
<span> | |
<%= b.check_box %> | |
<%= b.label %> | |
</span> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment