如何创建与一条主记录的 has_and_belongs_to_many 关联
假设我有模型开发人员和项目,开发人员 has_and_belongs_to_many 项目和项目 has_and_belongs_to_many 开发人员。如果开发商的项目之一应该是他的主要项目,那么建立协会的最佳方式是什么?
Let's say I have the models Developers and Projects, and developers has_and_belongs_to_many projects and projects has_and_belongs_to_many developers. What is the best way to set up the associations where one of the developer's projects should be his main project?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会选择:
开发人员
假设课程是开发人员和项目。
I would go with:
Developer
Assuming the classes are Developer and Project.