From 6fbe9ef2ffb1858027130789246f3ae24a0a182f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 3 Jan 2010 20:39:42 +0100 Subject: Use namespaces in notifications. --- actionpack/lib/action_view/render/partials.rb | 7 ++++--- actionpack/lib/action_view/render/rendering.rb | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_view/render') diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb index 5158415c20..4459ef6124 100644 --- a/actionpack/lib/action_view/render/partials.rb +++ b/actionpack/lib/action_view/render/partials.rb @@ -215,12 +215,13 @@ module ActionView options = @options if @collection - ActiveSupport::Notifications.instrument(:render_collection, :path => @path, - :count => @collection.size) do + ActiveSupport::Notifications.instrument("actionview.render_collection", + :path => @path, :count => @collection.size) do render_collection end else - content = ActiveSupport::Notifications.instrument(:render_partial, :path => @path) do + content = ActiveSupport::Notifications.instrument("actionview.render_partial", + :path => @path) do render_partial end diff --git a/actionpack/lib/action_view/render/rendering.rb b/actionpack/lib/action_view/render/rendering.rb index 48316cac53..578cfe1177 100644 --- a/actionpack/lib/action_view/render/rendering.rb +++ b/actionpack/lib/action_view/render/rendering.rb @@ -93,7 +93,7 @@ module ActionView def _render_template(template, layout = nil, options = {}) locals = options[:locals] || {} - content = ActiveSupport::Notifications.instrument(:render_template, + content = ActiveSupport::Notifications.instrument("actionview.render_template", :identifier => template.identifier, :layout => (layout ? layout.identifier : nil)) do template.render(self, locals) end @@ -109,7 +109,8 @@ module ActionView end def _render_layout(layout, locals, &block) - ActiveSupport::Notifications.instrument(:render_layout, :identifier => layout.identifier) do + ActiveSupport::Notifications.instrument("actionview.render_layout", + :identifier => layout.identifier) do layout.render(self, locals){ |*name| _layout_for(*name, &block) } end end -- cgit v1.2.3