diff options
author | José Valim <jose.valim@gmail.com> | 2010-10-10 12:34:31 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-10-10 12:43:26 +0200 |
commit | 940b57789fb9166658974c591e68d22ecab29f34 (patch) | |
tree | ffaf3b57cc89663f5e48a7fc5567dcb510fa931e /actionpack/lib/action_view/renderer/abstract_renderer.rb | |
parent | b88f4ca93bcaef9a6bfd21d95acc8f432a3c8e5c (diff) | |
download | rails-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.rb | 12 |
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 |