Forum: Ruby on Rails Which Association?

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.
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
Status table to contain all statuses for all models. I'd prefer not to
intermediary join tables for each model.

Lecturn.status_id  ->
Capturer.status_id  ->
Recording.status_id  ->

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


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.