I have read many articles about polymorphic associations in Rails and
also about plugins for this purpose (mainly the has_many_polymorphs
Unfortunately, I am still unsure how to solve my problem:
Let's say you have these models you want to set in relation to each
other: Person, Document, Realty.
You want to link polymorphic objects with each other. Let's call the
"join-class" Relationship. A Relationship has a name and at least two
A Relationship between Person and Document could be called "Creator".
A Relationship between a Person and a Realty would have the name
A Relationship between a Document and a Realty would have the name
So, how to implement this idea, and to be able to easly extend the list
of linkable objects? Is it possible to avoid any association-definitions
in the linkable models?
Thank you for your help,