search for: group_subscriptions

Displaying 3 results from an estimated 3 matches for "group_subscriptions".

Did you mean: group_subscription
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 => :group_subscription" and Groups has "has_many :users, :through => :group_subscription". I also have a group_subscription.rb model that has "belongs_to :user...
2006 Apr 03
0
has_many questions
...everal 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 < ActiveRecord::Base has_many :group_subscriptions has_many :groups, :through => :group_subscriptions has_many :administrators...
2012 Jun 18
0
Creating an object with a nested has_many :through relationship
I have 3 models that define members, groups and the subscriptions: Member, Group, and GroupMember. class Member < ActiveRecord::Base > has_many :group_subscriptions, class_name: "GroupMember" > has_many :groups, through: :group_subscriptions > attr_accessible :email, :password > end > class Group < ActiveRecord::Base > has_many :member_subscriptions, class_name: "GroupMember" > has_many :members, through: :membe...