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.
68081b23ba06e689e3d183fb01bc81eb?d=identicon&s=25 George Bray (Guest)
on 2009-02-05 00: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.
C041c0b87f840fe5b9145a0e9961d6ec?d=identicon&s=25 Ahmad (Guest)
on 2009-02-05 17:50
(Received via mailing list)
yes, polymorphic association.
This topic is locked and can not be replied to.