1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Template rendering should include layout time.

This commit is contained in:
José Valim 2010-01-15 12:23:13 +01:00
parent 6487d2871c
commit a5a9156b4e

View file

@ -93,11 +93,10 @@ module ActionView
def _render_template(template, layout = nil, options = {})
locals = options[:locals] || {}
content = ActiveSupport::Notifications.instrument("action_view.render_template",
:identifier => template.identifier, :layout => (layout ? layout.identifier : nil)) do
template.render(self, locals)
end
ActiveSupport::Notifications.instrument("action_view.render_template",
:identifier => template.identifier, :layout => layout.try(:identifier)) do
content = template.render(self, locals)
@_content_for[:layout] = content
if layout
@ -107,6 +106,7 @@ module ActionView
content
end
end
def _render_layout(layout, locals, &block)
ActiveSupport::Notifications.instrument("action_view.render_layout",