Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null transaction #16363

Merged
merged 2 commits into from
Jul 31, 2014
Merged

Null transaction #16363

merged 2 commits into from
Jul 31, 2014

Conversation

arthurnn
Copy link
Member

From this discussion #16341 (comment) .

This has only 2 simple commits.

  • Move TransactionManager to the bottom, so we can create a constant with the value being a Transaction sub-class. (the constant needs to be defined prior the TransactionManager definition)
  • s/ClosedTransaction/NullTransaction , and use NullTransaction as a constant.

review @rafaelfranca @chancancode

I have another PR, which will remove the inheritance on the Transaction class, but I didnt want to mix with these changes as It would make it WAY harder to follow the diff.

rafaelfranca added a commit that referenced this pull request Jul 31, 2014
@rafaelfranca rafaelfranca merged commit c8317cd into rails:master Jul 31, 2014
@arthurnn arthurnn deleted the null_transaction branch July 31, 2014 20:39
nathanbertram pushed a commit to procore/paranoia that referenced this pull request Aug 16, 2017
Fixes rubysherpas#274

It looks like ActiveRecord refactored the Transaction class hierarchy in
a non-backwards-compatible
way (rails/rails#16363), which breaks
`add_to_transaction` for null transactions (I think it probably
qualifies as a bug). The workaround is to not try to use
`add_to_transaction` in null transactions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants