Do you remember pg_morph, which "cheated" ActiveRecord? Now foreign keys for polymorphic relations can be added without unnecessary database overload.
Articles by Hanna Seweryn
Hanka Seweryn was discovering an Agile-Lean-Kanban world at the Lean Kanban Central Europe 2014 conference. Read a short summary of that journey!
pg_morph is a gem that makes it possible to add foreign key constraints for each polymorphic relation type with ActiveRecord and postgreSQL.