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:
parent
6487d2871c
commit
a5a9156b4e
1 changed files with 12 additions and 12 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue