Commit transactions when using return inside them
It doesn't really affect us because we never use `return`, `break` or `throw` inside transactions, since it would be confusing exactly because it wouldn't be 100% clear whether the transaction is committed or not. So we're using the new default value, which will be the only available option in Rails 7.2 [1]. [1] Commit eccc6061f4 in https://github.com/rails/rails
This commit is contained in:
@@ -209,7 +209,7 @@ Rails.application.config.active_record.run_after_transaction_callbacks_in_order_
|
|||||||
###
|
###
|
||||||
# Whether a `transaction` block is committed or rolled back when exited via `return`, `break` or `throw`.
|
# Whether a `transaction` block is committed or rolled back when exited via `return`, `break` or `throw`.
|
||||||
#++
|
#++
|
||||||
# Rails.application.config.active_record.commit_transaction_on_non_local_return = true
|
Rails.application.config.active_record.commit_transaction_on_non_local_return = true
|
||||||
|
|
||||||
###
|
###
|
||||||
# Controls when to generate a value for <tt>has_secure_token</tt> declarations.
|
# Controls when to generate a value for <tt>has_secure_token</tt> declarations.
|
||||||
|
|||||||
Reference in New Issue
Block a user