Why you should avoid nested STI | ActiveRecord, Rails 6
04-Jun-2020 1462
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:.
Why you should avoid nested STI | ActiveRecord, Rails 6 #ruby #rubydeveloper #rubyonrails #should #avoid #nested #ActiveRecord, #Rails #activerecord, https://www.rubyonrails.ba/link/why-you-should-avoid-nested-sti-activerecord-rails-6