Just ran into an issue with a has_many :through association and after/before-destroy callbacks not being triggered.
Say, I have users, groups, and an intermediate relati
adding dependent: :destroy to the has many relationship actually calls the before_destroy and after_destroy methods in the Membership class.
dependent: :destroy
before_destroy
after_destroy
Membership
class User < ActiveRecord::Base has_many :groups, through: :memberships, dependent: :destroy end