aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-02-22 20:00:41 -0200
committerYehuda Katz <yehudakatz@YK.local>2010-02-22 14:07:53 -0800
commit2b43021499f6e00a19eba3e7e48db403a61161bb (patch)
treeb7ff27d5f25a44a1f069cbcacfd0d602a100a9e9 /activerecord
parentca92e92ba18132dcfd57cf30a8492c6fea1c113a (diff)
downloadrails-2b43021499f6e00a19eba3e7e48db403a61161bb.tar.gz
rails-2b43021499f6e00a19eba3e7e48db403a61161bb.tar.bz2
rails-2b43021499f6e00a19eba3e7e48db403a61161bb.zip
avoid @transaction_joinable not initialized warning
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
index 027d736484..abb695264e 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -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