search for: groupsubscript

Displaying 2 results from an estimated 2 matches for "groupsubscript".

2006 Apr 03
0
has_many questions
...le a Group would like to know its membership. Additionally, a User can administer several Groups and a Group should know about its several Administators (Users). I have the following declarations: class Administrator < ActiveRecord::Base belongs_to :user belongs_to :group end class GroupSubscription < ActiveRecord::Base belongs_to :user belongs_to :group end class Group < ActiveRecord::Base has_many :group_subscriptions has_many :users, :through => :group_subscriptions has_many :administrators has_many :users, :through => :administrators end class User < A...
2006 Mar 30
5
Has_many :through problems -- please help
I''m having a lot of trouble with has_many, :through and could really use some assistance. I''ve got a User and Group class. Users can subscribe to groups, and groups should know who''s subscribed. I''ve got a join table (group_subscriptions) with group_id, user_id, and it''s own id element. Users has "has_many :groups, :through =>