[Rails] Re: User has many topics or subtopics

2009-06-28 Thread Phlip
AD wrote: > yes sorry, a topic can belong to many users. For subtopics we had > went the subtopics_users approach, but now that a new requirement came > in to support a user having either a topic with no subtopic as well as > a subtopic directly (impying topic). If I were to jump in late, and o

[Rails] Re: User has many topics or subtopics

2009-06-28 Thread AD
yes sorry, a topic can belong to many users. For subtopics we had went the subtopics_users approach, but now that a new requirement came in to support a user having either a topic with no subtopic as well as a subtopic directly (impying topic). Thanks On Sat, Jun 27, 2009 at 3:29 PM, Colin Law

[Rails] Re: User has many topics or subtopics

2009-06-27 Thread Colin Law
2009/6/27 AD : > > yea sorry if you have a subtopic, you have a topic since a subtopic > belongs to a topic.  So if I have TopicA, TopicB, and TopicA has > SubTopicD and SubTopicE, a user can have > > TopicB, SubtopicE.  Since SubTopicE belongs to TopicA they would also > have that.   The requirem

[Rails] Re: User has many topics or subtopics

2009-06-27 Thread AD
yea sorry if you have a subtopic, you have a topic since a subtopic belongs to a topic. So if I have TopicA, TopicB, and TopicA has SubTopicD and SubTopicE, a user can have TopicB, SubtopicE. Since SubTopicE belongs to TopicA they would also have that. The requirement was really that they did

[Rails] Re: User has many topics or subtopics

2009-06-27 Thread Colin Law
2009/6/27 Andrey Ognevsky : > > AD wrote: >> Hi, >> >>  So i have users in the system and i have topics.  Topics also >> have_many subtopics.  What is the cleanest way to setup the AR >> relationships if a user can either have_many topics or subtopics ? >> Its basically a dual select box dropdown,

[Rails] Re: User has many topics or subtopics

2009-06-27 Thread Andrey Ognevsky
AD wrote: > Hi, > > So i have users in the system and i have topics. Topics also > have_many subtopics. What is the cleanest way to setup the AR > relationships if a user can either have_many topics or subtopics ? > Its basically a dual select box dropdown, where the second dropdown is > optio