Tag: 最好的就地

Rails 4 – best_in_place gem和多对多关联

我正在努力添加使用best_in_place (jQuery inplace -editor gem)更新联系语言的能力。 我有联系人对象,语言对象和联系人和语言之间的has_and_belongs_to_many:languages关系。 因此,has_and_belongs_to_many隐含了联系人和语言表之间的连接表。 总结一下,我有这样的事情: contacts contacts_languages languages +——+——–+ +————+————-+ +——+————+ | id | name | | contact_id | language_id | | id | name | +——+——–+ +————+————-+ +——+————+ | 1 | John | | 1 | 2 | | 1 | EN | | 2 | Mike | | 1 | […]