Do not use an exit statement in transactions
With ActiveRecord 7.x, transactions are now rolled back whenever they return early. Previously, they were still committed. With `next`, the transactions aren't rolled back. This is also what RuboCop suggests. For details: - https://github.com/rails/rails/issues/45017 - https://docs.rubocop.org/rubocop-rails/cops_rails.html#railstransactionexitstatement
parent
927f1faa
Please register or sign in to comment