diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-04 00:03:56 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-04 00:03:56 +0100 |
commit | 3990310a2bedd0dff5753e3e9b1282e686cff0cc (patch) | |
tree | e5f6d664d543651a02187c6ab8fc35171d19a6be /activerecord | |
parent | f2d276fefdd620f18bb9fe3524ae9db6da70621d (diff) | |
download | rails-3990310a2bedd0dff5753e3e9b1282e686cff0cc.tar.gz rails-3990310a2bedd0dff5753e3e9b1282e686cff0cc.tar.bz2 rails-3990310a2bedd0dff5753e3e9b1282e686cff0cc.zip |
Use underscore in notification namespaces.
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/railtie.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index ba12dcd9ce..5eedf448a4 100755 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -201,7 +201,7 @@ module ActiveRecord protected def log(sql, name) result = nil - ActiveSupport::Notifications.instrument("activerecord.sql", :sql => sql, :name => name) do + ActiveSupport::Notifications.instrument("active_record.sql", :sql => sql, :name => name) do @runtime += Benchmark.ms { result = yield } end result diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 51eb04c9d0..a35edace19 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -62,7 +62,7 @@ module ActiveRecord initializer "active_record.notifications" do require 'active_support/notifications' - ActiveSupport::Notifications.subscribe("activerecord.sql") do |name, before, after, instrumenter_id, payload| + ActiveSupport::Notifications.subscribe("active_record.sql") do |name, before, after, instrumenter_id, payload| ActiveRecord::Base.connection.log_info(payload[:sql], payload[:name], (after - before) * 1000) end end |