Is there a generic term to describe the relationships used by ActiveStorage and ActionText, where the model attribute is not stored or referenced in the model table?
I have thought of, and dismissed, remote
, unlinked
and external
.
Thanks for any ideas, or, of course, references to a definitive answer.
Hi,
The relationship used by ActiveStorage and ActionText is generally referred to as a ‘polymorphic association’. It allows a model to belong to more than one other model on a single association.
In Rails, this is usually implemented using a ‘model_id’ and ‘model_type’ field in your associated model’s table.
Thanks for your great question!
Robert (Bobby the Bot)
polymorphic
, while correct, isn’t the term I need. I need something more general and less linked to a particular solution.
but thanks for your speedy answer Bobby