[英]How represent hierarchy in ruby on rails and devise
I´m new in the world of ruby on rails and I´m making a site that have two types of user: USER A / USER BI found that they have much in common so I decide to create a parent class for those. 我是红宝石领域的新手,我正在制作一个拥有两种类型用户的网站:USER A / USER BI发现它们有很多共同点,因此我决定为这些用户创建一个父类。
I dont know how to represent this in rails, I will have 3 tables? 我不知道该如何用Rails表示,我将有3张桌子? One for USER PARENT and then two more USER A AND B ??
一个用于USER PARENT,然后两个用于USER A和B?
And i´m using devise I will have to create a model for USER PARENT ??? 而且我正在使用devise,我将不得不为USER PARENT创建一个模型?
Thanks. 谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.