Forum: Ruby on Rails Which Association?

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.
George Bray (Guest)
on 2009-02-05 01:09
(Received via mailing list)
I have a number of models and each has a Status.  I want to have a
single
Status table to contain all statuses for all models. I'd prefer not to
have
intermediary join tables for each model.

Lecturn.status_id  -> Status.id
Capturer.status_id  -> Status.id
Recording.status_id  -> Status.id
etc

Is this a polymorphic association, or is there a better way?

thanks!

--
George Bray, The Australian National University, Canberra, Australia.
Ahmad (Guest)
on 2009-02-05 18:50
(Received via mailing list)
yes, polymorphic association.
This topic is locked and can not be replied to.