From d02f2d2fb213584ce52a231063c948def856f657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 25 Jul 2010 18:26:42 +0200 Subject: runtime should be properly initialized. --- activerecord/lib/active_record/log_subscriber.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb index 74b5893bfb..c7ae12977a 100644 --- a/activerecord/lib/active_record/log_subscriber.rb +++ b/activerecord/lib/active_record/log_subscriber.rb @@ -5,7 +5,7 @@ module ActiveRecord end def self.runtime - Thread.current["active_record_sql_runtime"] + Thread.current["active_record_sql_runtime"] ||= 0 end def self.reset_runtime @@ -45,5 +45,4 @@ module ActiveRecord end end -ActiveRecord::LogSubscriber.runtime = 0 ActiveRecord::LogSubscriber.attach_to :active_record \ No newline at end of file -- cgit v1.2.3