Hi, given a data model like this: membership belongs_to user membership belongs_go group user has_many memberships user has_many groups through memberships group has_many memberships group has_many users through memberships What''s the most elegant way of setting a new collection of users as members in a group? Anything better than: group.memberships.clear group.users << my_new_users In a normal has_many relationship, you can do group.users my_new_users, but that doesn''t "go through". Br. Morten --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---