Skip to content

Commit

Permalink
Merge pull request #109 from fractaledmind/fix-deprecation-warning-fo…
Browse files Browse the repository at this point in the history
…r-commit-on-non-local-return

Avoid a deprecation warning or error
  • Loading branch information
fractaledmind authored Dec 16, 2024
2 parents 4684c96 + 7a932ac commit f3c8f8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
end

# see: https://github.com/rails/rails/pull/48600
if ActiveRecord.respond_to?(:commit_transaction_on_non_local_return)
if ActiveRecord.respond_to?(:commit_transaction_on_non_local_return) &&
Rails::VERSION::MAJOR >= 7 &&
Rails::VERSION::MINOR <= 1
ActiveRecord.commit_transaction_on_non_local_return = true
end

Expand Down

0 comments on commit f3c8f8e

Please sign in to comment.