Merge pull request #35337 from abhaynikam/35265-remove-unused-argument-layout-from-rendered-template
Removed unused layout attribute from RenderedTemplate
This commit is contained in:
commit
a0434ce37f
@ -59,11 +59,10 @@ def body; nil; end
|
||||
end
|
||||
|
||||
class RenderedTemplate # :nodoc:
|
||||
attr_reader :body, :layout, :template
|
||||
attr_reader :body, :template
|
||||
|
||||
def initialize(body, layout, template)
|
||||
def initialize(body, template)
|
||||
@body = body
|
||||
@layout = layout
|
||||
@template = template
|
||||
end
|
||||
|
||||
@ -97,8 +96,8 @@ def prepend_formats(formats) # :doc:
|
||||
@lookup_context.formats = formats | @lookup_context.formats
|
||||
end
|
||||
|
||||
def build_rendered_template(content, template, layout = nil)
|
||||
RenderedTemplate.new content, layout, template
|
||||
def build_rendered_template(content, template)
|
||||
RenderedTemplate.new content, template
|
||||
end
|
||||
|
||||
def build_rendered_collection(templates, spacer)
|
||||
|
@ -364,7 +364,7 @@ def render_partial(view, template)
|
||||
|
||||
content = layout.render(view, locals) { content } if layout
|
||||
payload[:cache_hit] = view.view_renderer.cache_hits[template.virtual_path]
|
||||
build_rendered_template(content, template, layout)
|
||||
build_rendered_template(content, template)
|
||||
end
|
||||
end
|
||||
|
||||
@ -455,7 +455,7 @@ def collection_with_template(view, template)
|
||||
content = template.render(view, locals)
|
||||
content = layout.render(view, locals) { content } if layout
|
||||
partial_iteration.iterate!
|
||||
build_rendered_template(content, template, layout)
|
||||
build_rendered_template(content, template)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -71,7 +71,7 @@ def render_with_layout(view, template, path, locals)
|
||||
else
|
||||
content
|
||||
end
|
||||
build_rendered_template(body, template, layout)
|
||||
build_rendered_template(body, template)
|
||||
end
|
||||
|
||||
# This is the method which actually finds the layout using details in the lookup
|
||||
|
Loading…
Reference in New Issue
Block a user