- a Rails Concern
- a polymorphic association
- single table inheritance
- a Ruby module as a mixin
all of above can be used to share common attributes and behaviors between more than 2 ActiveRecord models. I searched several articles but couldn't figure it out clearly.
Aucun commentaire:
Enregistrer un commentaire