Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initializing @open_transactions in the initialize method

  • Loading branch information...
commit 1ff52cbe818f9f7bad2a9ff6ae0e515f82b1ab06 1 parent d6af6fc
@tenderlove tenderlove authored fxn committed
View
6 activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -43,6 +43,7 @@ def initialize(connection, logger = nil) #:nodoc:
@connection, @logger = connection, logger
@query_cache_enabled = false
@query_cache = Hash.new { |h,sql| h[sql] = {} }
+ @open_transactions = 0
@instrumenter = ActiveSupport::Notifications.instrumenter
end
@@ -177,12 +178,9 @@ def raw_connection
@connection
end
- def open_transactions
- @open_transactions ||= 0
- end
+ attr_reader :open_transactions
def increment_open_transactions
- @open_transactions ||= 0
@open_transactions += 1
end
Please sign in to comment.
Something went wrong with that request. Please try again.