Project

General

Profile

Why member_roles dependent => :destroy in member.rb?

Added by Zach Hamman almost 10 years ago

I was wondering why destroy was chosen over delete_all for the dependence for :member_roles. I noticed that when I wrote code to tell someone they've been removed from a project that they were emailed twice because my after_delete was called from MemberRoles#remove_member_if_empty which is called when member.destroy is executed.

Thanks.