Polymorphism in 6 steps

A slightly advanced association in ActiveRecord is called polymorphic association. This usually happens when a model can belong to more than one model, even if it behaves the same way, but it’s easier to understand with an example. Suppose you have a blog that has articles, photos, and events. You want to add comments on...
Read More