DEV Community

Rails' Polymorphic Associations

Adjoa on July 14, 2018

In this post I'll give you an overview of how polymorphic associations work in Rails and how to add them to your projects. How I Got He...
Collapse
 
gathuku profile image
Moses Gathuku

Thank for the nice blog.

I came across this rails generate model product supplier:references{polymorphic}. And left me with alot of questions:-

  1. This creates a model product and foreign key supplier as polymorphic, is it correct?
  2. No use of -able suffix?
Collapse
 
lucasprag profile image
lucasprag

Great post!