Displaying 1 result from an estimated 1 matches for "save_membership".
Did you mean:
save_memberships
2009 May 11
0
updating join table (HMT) with checkbox and extra fields
..., Membership table has an extra field called membership_id and I
want the user to fill in that id in the edit form.
My view looks like this. The checkbox fields works great and I can
update my db pretty well (barring minor issues).
<% form_for :user, @user, :url => { :action => ''save_memberships''} do |
form| %>
<%= form.error_messages %>
<% @groups.each do |g| %>
<%= check_box_tag("user[membership_ids][]", g.id,
@user.groups.include?(g)) %>
<%= "#{g.name}"%><br>
----> I have to invoke my partial to co...