Hey guys I\'ve been using the has_and_belongs_to_many relationship with checkboxes example from the Railscast Episode #17 . I had some problems and now everything is workin
I played around with the form and the correct code is this ==>
<% form_for @user do |f| %>
<% for interest in Interest.find(:all) %>
<%= check_box_tag "user[interest_ids][]", interest.id, @user.interests.include?(interest) %>
<%= interest.name %>
<% end %>
<%= f.submit 'Edit' %>
<% end %>
I'm so happy! So apparently the problem was :user which should the be object @user.