jeudi 7 mai 2015

Object with more than one Model (Rails)

BACKGROUND: I'm thinking conceptually about how to reference a single object that can belong to more than one model. For instance, if I have a School and Employer model - a User could theoretically have attended and be employed at the same School. Ideally both relationships to point to the same object.

QUESTION: How would I model that in a postgresql-based Rails app?

Aucun commentaire:

Enregistrer un commentaire