Polymorphic Associations

Hello,

I hope somebody can help me figure out how to solve the following
problem.

These are the models that I am trying to associate one to the other.

Location
Organization => league, club, etc.
Event => competition, class, etc.

League and Club (and others) are subclasses of Organization
Competition and Class (and others) are subclasses of Event
An event and an organization have many locations and a location has many
organizations and events.

I have tried using STI at first and then polymorphic associations. I
didn’t get too far, because this example uses two layers of polymorphic
associations. Can someone give me a starting point at least?

Thanks,

Andrei

I’m not sure what you’re asking exactly, but can you try to create a
very basic polymorphic association? Then slowly add to it making it
more complex?

This helps me often

On Jul 24, 3:55 pm, Andrei E. [email protected]