I have been struggling to get some check boxes working but have had
absolutely no luck. Can someone tell me what I am doing wrong. Any help
would be greatly appreciated.
Here is the code in my view:
<% for size in @sizes %>
<%= f.check_box('size_list', size, @item.sizes.collect {|size|
size.id}.include?(size.id)) %><%=h size.name %><br />
<% end %>
Here is the entire view as I have it now. I did manage to get the check
boxes to show up finally but once you submit the form and come back to
the view again to check that the information was saved correctly they
are all messed up. For example I have three sizes in my database (10,11,
and 12) and the first time you view the form these are the three options
shown but if you select anyof the and submit the form when you refresh
the form they all three have the same label (12 in my case). I'm just
plain confused here.