Skip to content
Unverified Commit ba3c033b authored by Dany Marcoux's avatar Dany Marcoux
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment