I have a User that has_many Categories.
These Categories are represented as checkboxes.
What I want to happen is on their settings page, it should show all the checkboxes with the ones they have previously selected already checked.
It should also allow them to check new ones, or uncheck existing ones to update their profile.
This is how I initially generate the checkboxes when they first select the categories:
<% @categories.each do |cat| %>
<span class="three columns alpha">
<label for="regularCheckbox">
<%= check_box_tag "user[category_ids][]", cat.id, false %>
<span class="gig-check"><%= cat.name %></span>
</label>
</span>
<% end %>
Thoughts?
I do this usually: