Active Record has_many :through remove one associated record
问题 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 . IE: class Photo has_many :tags, :through => :taggings has_many :taggings, :dependent => :destroy end class Tags has_many :photos, :through => :taggings has_many :taggings, :dependent => :destroy end class Taggings belongs_to :photo belongs_to :tag end If you have two objects, tag and photo , you can associate them just by