aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/renderer/abstract_renderer.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-10-10 12:34:31 +0200
committerJosé Valim <jose.valim@gmail.com>2010-10-10 12:43:26 +0200
commit940b57789fb9166658974c591e68d22ecab29f34 (patch)
treeffaf3b57cc89663f5e48a7fc5567dcb510fa931e /actionpack/lib/action_view/renderer/abstract_renderer.rb
parentb88f4ca93bcaef9a6bfd21d95acc8f432a3c8e5c (diff)
downloadrails-940b57789fb9166658974c591e68d22ecab29f34.tar.gz
rails-940b57789fb9166658974c591e68d22ecab29f34.tar.bz2
rails-940b57789fb9166658974c591e68d22ecab29f34.zip
Add support to render :once.
This will be used internally by sprockets to ensure requires are executed just once.
Diffstat (limited to 'actionpack/lib/action_view/renderer/abstract_renderer.rb')
-rw-r--r--actionpack/lib/action_view/renderer/abstract_renderer.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_view/renderer/abstract_renderer.rb b/actionpack/lib/action_view/renderer/abstract_renderer.rb
index f9fa63ce7f..77cfa51dff 100644
--- a/actionpack/lib/action_view/renderer/abstract_renderer.rb
+++ b/actionpack/lib/action_view/renderer/abstract_renderer.rb
@@ -14,12 +14,6 @@ module ActionView
raise NotImplementedError
end
- # Contains the logic that actually renders the layout.
- def render_layout(layout, locals, &block) #:nodoc:
- view = @view
- layout.render(view, locals){ |*name| view._layout_for(*name, &block) }
- end
-
# Checks if the given path contains a format and if so, change
# the lookup context to take this new format into account.
def wrap_formats(value)
@@ -32,5 +26,11 @@ module ActionView
yield
end
end
+
+ protected
+
+ def instrument(name, options={})
+ ActiveSupport::Notifications.instrument("render_#{name}.action_view", options){ yield }
+ end
end
end \ No newline at end of file