Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个模型。婚礼和客人。
class Wedding has_many guests end class Guest has_many weddings end
如何让客人可以接受或拒绝邀请?
您需要与中间模型建立多对多关系。请参阅指南。请参阅此处的 2.4 has_many :through Association主题。
在那个新模型/表上,您可以添加一个属性(可能是一个布尔“拒绝”属性)来控制客人的帮助......