search for: parent_group_id

Displaying 1 result from an estimated 1 matches for "parent_group_id".

2006 Nov 29
4
how do I model self-referential entities?
Hi all - I am having some trouble figuring out how to model self-referential entities in Rails. I have a "group" model, which can have 0 or more "group" objects or 0 or more "user" objects. I tried creating a subgroup table that has a parent_group_id and a child_group_id as foreign keys but can''t figure out how to create the mapping in my ruby model classes. I can''t come up with the correct parameters for habtm or has_many :through. Any help would be appreciated. Ken --~--~---------~--~----~------------~-------~--~----~...