I have a model which has many children. I was setting/removing the children as such:
mymodel.children_ids = [1,2,3]
mymodel.save #add the children
mymodel.children_ids = [1]
mymodel.save #remove children 2,3
This works just fine, but I just realized that none of the callbacks (i.e. after_destroy) are not being called on the children model.
After some digging, it turns out that the delete_all function is being executed, rather than destroy_all. As the docs correctly state, the delete_all function does not fire off the callbacks, so is there anyway to change this behavior?
Thanks.