How to model has_many with polymorphism?
- by Daniel Abrahamsson
I've run into a situation that I am not quite sure how to model.
Suppose I have a User class, and a user has many services. However, these services are quite different, for example a MailService and a BackupService, so single table inheritance won't do. Instead, I am thinking of using polymorphic associations together with an abstract base class:
…