Active Record has_many :through remove one associated record

前端 未结 1 631
日久生厌
日久生厌 2020-12-24 11:02

This may be a very basic oversight on my part, but I can\'t seem to recall a simple method for removing an association between two objects joined via has_many :through

相关标签:
1条回答
  • 2020-12-24 11:26

    here's what you want:

    photo.tags.delete(tag)
    
    0 讨论(0)
提交回复
热议问题