File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
connection_adapters/abstract Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -550,7 +550,7 @@ def self.all_open_transactions # :nodoc:
550
550
if active_connection = pool . active_connection
551
551
current_transaction = active_connection . current_transaction
552
552
553
- if current_transaction . open? && current_transaction . joinable? && ! current_transaction . state . invalidated?
553
+ if current_transaction . open? && current_transaction . joinable?
554
554
open_transactions << current_transaction
555
555
end
556
556
end
Original file line number Diff line number Diff line change @@ -175,11 +175,11 @@ def dirty?
175
175
end
176
176
177
177
def open?
178
- true
178
+ ! closed?
179
179
end
180
180
181
181
def closed?
182
- false
182
+ @state . finalized?
183
183
end
184
184
185
185
def add_record ( record , ensure_finalize = true )
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def open?
112
112
113
113
# Returns true if the transaction doesn't exist or is finalized.
114
114
def closed?
115
- @internal_transaction . nil? || @internal_transaction . state . finalized ?
115
+ @internal_transaction . nil? || @internal_transaction . closed ?
116
116
end
117
117
118
118
alias_method :blank? , :closed?
You can’t perform that action at this time.
0 commit comments