Forum: Ruby on Rails Polymorphic compatible with HABTM?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Don M. (Guest)
on 2006-03-31 02:36
Can you use polymorphic with a habtm relationship?

If so I would assume the join table would contain both the
foreign key and the type for both sides of the table. The
API documentation is unclear, although it may be out of date.

I would prefer not to. I am trying to model a Person, who
may be associated with many different models. A person
may also be a member of one or more Teams, each of which
has zero or more Persons.


Thanks,
Don Mc
This topic is locked and can not be replied to.