mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
avoid @transaction_joinable not initialized warning
This commit is contained in:
committed by
Yehuda Katz
parent
ca92e92ba1
commit
2b43021499
@@ -113,7 +113,7 @@ module ActiveRecord
|
||||
def transaction(options = {})
|
||||
options.assert_valid_keys :requires_new, :joinable
|
||||
|
||||
last_transaction_joinable = @transaction_joinable
|
||||
last_transaction_joinable = defined?(@transaction_joinable) ? @transaction_joinable : nil
|
||||
if options.has_key?(:joinable)
|
||||
@transaction_joinable = options[:joinable]
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user