Why you should avoid nested STI | ActiveRecord, Rails 6

04-Jun-2020 1451
Nested Single Table Inheritance doesn’t work well. Here’s what you must know to make it work or work around it. Initial specifications: a project owner creates a project and donors can contribute.Later, a little change was made to the specifications: a donor may either be a natural person (an individual human) or a legal person (a corporation or any other kind of legal entity).Since both are donors and will share some significant amount of logic, it seems obvious that they are both a specialization of User::Donor, hence:.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle