diff options
author | Justin George <justin.george@gmail.com> | 2010-04-27 21:16:06 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-02 22:45:54 +0200 |
commit | 731d4392e478ff5526b595074d9caa999da8bd0c (patch) | |
tree | d44fc64ddc208880501ef00f3f916d04d8e28141 /actionpack/lib/action_view/render | |
parent | 109d3ee38d1c39f0e27bc827065427635d6396b2 (diff) | |
download | rails-731d4392e478ff5526b595074d9caa999da8bd0c.tar.gz rails-731d4392e478ff5526b595074d9caa999da8bd0c.tar.bz2 rails-731d4392e478ff5526b595074d9caa999da8bd0c.zip |
Change event namespace ordering to most-significant first [#4504 state:resolved]
More work still needs to be done on some of these names
(render_template.action_view and render_template!.action_view particularly)
but this allows (for example) /^sql/ to subscribe to all
the various ORMs without further modification
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib/action_view/render')
-rw-r--r-- | actionpack/lib/action_view/render/partials.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_view/render/rendering.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb index 4d23d55687..974345633c 100644 --- a/actionpack/lib/action_view/render/partials.rb +++ b/actionpack/lib/action_view/render/partials.rb @@ -211,12 +211,12 @@ module ActionView identifier = ((@template = find_template) ? @template.identifier : @path) if @collection - ActiveSupport::Notifications.instrument("action_view.render_collection", + ActiveSupport::Notifications.instrument("render_collection.action_view", :identifier => identifier || "collection", :count => @collection.size) do render_collection end else - content = ActiveSupport::Notifications.instrument("action_view.render_partial", + content = ActiveSupport::Notifications.instrument("render_partial.action_view", :identifier => identifier) do render_partial end diff --git a/actionpack/lib/action_view/render/rendering.rb b/actionpack/lib/action_view/render/rendering.rb index 492326964a..4198013f57 100644 --- a/actionpack/lib/action_view/render/rendering.rb +++ b/actionpack/lib/action_view/render/rendering.rb @@ -52,7 +52,7 @@ module ActionView locals = options[:locals] || {} layout = find_layout(layout) if layout - ActiveSupport::Notifications.instrument("action_view.render_template", + ActiveSupport::Notifications.instrument("render_template.action_view", :identifier => template.identifier, :layout => layout.try(:virtual_path)) do content = template.render(self, locals) { |*name| _layout_for(*name) } |