ruby on rails - Alternative to STI model -
i have project user can manage (crud) 1 or n clients. each of have 1 type; either natural person or legal person.
i thought creating client model type column in order use sti pattern; while having 2 classes np , lp inherit client.
i did research sti concept , this article has convinced me go different approach. main reason 2 models np , lp, not have many fields in common, , want avoid having many columns null value in db.
so wondering how can have user managing client whether natural or legal person.
thanks help
Comments
Post a Comment