Polymorphic Associations

Difficulty: Advanced

Question

What is a Polymorphic Association?

Answer

When a model can belong to more than one other model on a single association (e.g., a `Comment` table that can belong to both `Post` and `Video`).

Concepts covered

Schema Design, Relationships