Forum: Ruby on Rails Polymorphic compatible with HABTM?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and 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.

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