diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/log_subscriber.rb | 3 |
1 files changed, 1 insertions, 2 deletions
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 |