Jump to content

The ultimate community for Ruby on Rails developers.


How should I relate my models/tables? STI? Polymorphic?

STI Single Table Inheritance Polymorphism Models Tables

  • Please log in to reply
No replies to this topic

#1 agwallace



  • Members
  • 1 posts

Posted 18 August 2014 - 11:38 PM

I'm about to start constructing my models from my ERD but I'm having some difficulty determining how to best relate some models.  


I have an Organization model, a Business model and a Charity model.  The business and charity models are both types of organizations as they share similar attributes, but they each have their own unique attributes as well.


My question is, how should I structure the relationship or should I just keep them as independent models?


Thank you.

Also tagged with one or more of these keywords: STI, Single Table Inheritance, Polymorphism, Models, Tables

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users