Forum: Ruby on Rails polymorphic question

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.
Chris H. (Guest)
on 2009-03-10 02:41
(Received via mailing list)
I have a "ports" model I wanted to make polymorphic.  I have an alarm
table that has a port, and I also have a circuits model that has 2

Is there a way to use the circuits model as polymorphic with 2 ports
each one a different port?
Chris H. (Guest)
on 2009-03-10 23:37
(Received via mailing list)
Sj T. (Guest)
on 2009-03-11 06:20
Chris H. wrote:
> anybody?

It sounds like you will have to use an intermediate table that the
circuits model will have a one-many relationship with and then use ports
polymorphically in that intermediate table.
Chris H. (Guest)
on 2009-03-12 02:34
(Received via mailing list)
Is there an easier way to implement this?
Maybe other than polymorphic?

I have a circuits table that has 2 ports.  What is the easiest way to do

On Tue, Mar 10, 2009 at 11:20 PM, Sj Tib
This topic is locked and can not be replied to.