diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-03-18 10:23:14 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-18 10:24:16 -0700 |
commit | 3911a7c197cf40fadab62d17def21db8a3d52f5e (patch) | |
tree | fc575f0d507d66e9857b5a13a8ae7faaf0e6fb2f /activerecord/lib/active_record | |
parent | 191a2f78b1abeb4d3b5b27de83ffe14b833c4c7f (diff) | |
download | rails-3911a7c197cf40fadab62d17def21db8a3d52f5e.tar.gz rails-3911a7c197cf40fadab62d17def21db8a3d52f5e.tar.bz2 rails-3911a7c197cf40fadab62d17def21db8a3d52f5e.zip |
squelching more warnings in the AR tests. [#4218 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record')
-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 |