Article.current_transaction.after_commit outside of a transaction: whats the point?
In Rails 7.2, they introduce Article.current_transaction.after_commit, saying “for code that may run either inside or outside a transaction and needs to perform work after the state changes have been properly persisted”, and they give the following code: