diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-17 23:44:03 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-17 23:44:03 +0100 |
commit | a6dc227167a8a720bd18495268305b15aa08d8f4 (patch) | |
tree | b641b258a5670526947145c27d091f991e482b2e /actionpack/lib/action_view | |
parent | 21dcbb17de86b92df1a67e233fdc457be4fdf2d7 (diff) | |
download | rails-a6dc227167a8a720bd18495268305b15aa08d8f4.tar.gz rails-a6dc227167a8a720bd18495268305b15aa08d8f4.tar.bz2 rails-a6dc227167a8a720bd18495268305b15aa08d8f4.zip |
Mark bang instrumentations as something that you shuold not be listening to.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/template.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index ad37eb4c4a..9145d007a8 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -23,7 +23,6 @@ module ActionView @identifier = identifier @handler = handler - @partial = details[:partial] @virtual_path = details[:virtual_path] @method_names = {} @@ -36,9 +35,9 @@ module ActionView end def render(view, locals, &block) - # TODO: Revisit this name - # This is only slow if it's being listened to. Do not instrument this in production. - ActiveSupport::Notifications.instrument("action_view.slow_render_template", :virtual_path => @virtual_path) do + # Notice that we use a bang in this instrumentation because you don't want to + # consume this in production. This is only slow if it's being listened to. + ActiveSupport::Notifications.instrument("action_view.render_template!", :virtual_path => @virtual_path) do method_name = compile(locals, view) view.send(method_name, locals, &block) end @@ -63,10 +62,6 @@ module ActionView @counter_name ||= "#{variable_name}_counter".to_sym end - def partial? - @partial - end - def inspect if defined?(Rails.root) identifier.sub("#{Rails.root}/", '') |