Fix logic on disabling afer_commit callbacks
#32807

bdurand wants to merge bdurand:fix_committed_disable_callbacks into rails:master

We do not currently have an analysis of these two commits