search for: whale_id

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

Did you mean: phile_id
2006 Feb 06
4
Relationship Question (STI)
...ue enough to break into their own models. I could use STI, but I think the table would just have too many columns. Now, I wanted to let the Dog''s, Whale''s and Monkey''s be buddies, and keep track of their relationships. I created a Buddies table (with monkey_id, dog_id, whale_id), and had has_many relationships to link them all up. This will work... however, if I wanted to list all of a Monkey''s Buddies... it get''s tricky. I have to query the Buddies table to get the relationships, then query both the Whale and Monkey to get the appropriate objects back....