From: Joel VanderWerf Date: 2007-04-06T12:54:56+09:00 Subject: Re: Can I save relationship using hasmanythrough jack.tang wrote: > Hi > > In the classic hasmanythrough example: > > class Group < ActiveRecord::Base > has_many :memberships > has_many :users, :through => :memberships > end > > class User < ActiveRecord::Base > has_many :memberships > has_many :groups, :through => :memberships > end > > group1 = Group.new(.....) > group1.users = [User.find_by_id(2)] > group1.save! > > it throws the exception: "users=" is one undefined method. So how can > i save the relationship in hasmanythrough? > To save your relationship you might try (a) flowers (b) therapy (c) the rails list -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407