Polymorphic with foreign key support.

Since FK’s are now accepted and in rails 4 how about we fix polymorphic which something like this?


Anyone from core ideas on this?

I’d rather keep this behavior in a plugin than integrate it into Rails core.

It’s true that Rails now has support for adding and removing foreign key constraints.

However that doesn’t mean that everyone has to use them all the time.

In the case of polymorphic relations you can’t use them. The gem proposes a different schema structure

to make it possible to define foreign keys. That structure might be good for some projects but for others

the current Rails approach is a better fit. This means we’d still have to support both schema structures.


– Yves