I am having trouble trying to figure out how to set up this many to many relationship. I have 4 models (ModelA, ModelB, ModelC, ModelD). A user can create any number of these models and they can relate instances of these models to each other in a many to many relationship. So a ModelA record can be associated with another ModelA record, a ModelB record can be associated with a ModelB and a ModelC record, etc...
My original idea was to create a model_relationship table that had a structure such as: t.int object1_id t.string object1_type t.int object2_id t.string object2_type I am having trouble figuring out how to set this up as a Model though, especially since you can't always know if the object you are looking at is object1 or object2 in the relationship field. Does anyone have any advice for this type of problem? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---