diff options
Diffstat (limited to 'activerecord/lib/active_record/railties/log_subscriber.rb')
-rw-r--r-- | activerecord/lib/active_record/railties/log_subscriber.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railties/log_subscriber.rb b/activerecord/lib/active_record/railties/log_subscriber.rb index 48b25032ce..31b98bb6ed 100644 --- a/activerecord/lib/active_record/railties/log_subscriber.rb +++ b/activerecord/lib/active_record/railties/log_subscriber.rb @@ -1,6 +1,11 @@ module ActiveRecord module Railties class LogSubscriber < Rails::LogSubscriber + def initialize + super + @odd_or_even = false + end + def sql(event) name = '%s (%.1fms)' % [event.payload[:name], event.duration] sql = event.payload[:sql].squeeze(' ') @@ -24,4 +29,4 @@ module ActiveRecord end end end -end
\ No newline at end of file +end |