Skip to content
Browse files

Remove @state.parent assignment on commit

This piece of code was introduced on
67d8bb9 , which was calling
`committed?` in the `transaction_state` before calling the `committed!`
method. However on 7386ffc, the
`committed?` check was removed and replaced by a `finalized?`, which
only checks if the state is not nil. Thus we can remove that line.
  • Loading branch information...
1 parent aade0a0 commit dd9829a9ea460ddcfc8d954f2b95161b52fff6e7 @arthurnn arthurnn committed Jul 29, 2014
Showing with 1 addition and 2 deletions.
  1. +1 −2 activerecord/lib/active_record/connection_adapters/abstract/transaction.rb
3 activerecord/lib/active_record/connection_adapters/abstract/transaction.rb
@@ -72,7 +72,7 @@ def savepoint_name
class TransactionState
- attr_accessor :parent
+ attr_reader :parent
VALID_STATES =[:committed, :rolledback, nil])
@@ -245,7 +245,6 @@ def perform_rollback
def perform_commit
- @state.parent = parent.state

0 comments on commit dd9829a

Please sign in to comment.
Something went wrong with that request. Please try again.