Polymorphic relationships in Rails that keep your database happy.