diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-05-01 15:45:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-01 15:45:06 -0500 |
commit | a0434ce37f7e889b6b9a07922a31edd25993de3d (patch) | |
tree | 0fba0022dfd58d3322f2f737a9d7ca0cf0d51ac4 /actionview/lib/action_view | |
parent | 51a481fa7400772ca23c0e8e658523d78f8d8305 (diff) | |
parent | 1de6a20a6dd68a89cc768fc48e920157a1c83a90 (diff) | |
download | rails-a0434ce37f7e889b6b9a07922a31edd25993de3d.tar.gz rails-a0434ce37f7e889b6b9a07922a31edd25993de3d.tar.bz2 rails-a0434ce37f7e889b6b9a07922a31edd25993de3d.zip |
Merge pull request #35337 from abhaynikam/35265-remove-unused-argument-layout-from-rendered-template
Removed unused layout attribute from RenderedTemplate
Diffstat (limited to 'actionview/lib/action_view')
3 files changed, 7 insertions, 8 deletions
diff --git a/actionview/lib/action_view/renderer/abstract_renderer.rb b/actionview/lib/action_view/renderer/abstract_renderer.rb index 475452f1bb..b397c02cde 100644 --- a/actionview/lib/action_view/renderer/abstract_renderer.rb +++ b/actionview/lib/action_view/renderer/abstract_renderer.rb @@ -59,11 +59,10 @@ module ActionView 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 @@ module ActionView @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) diff --git a/actionview/lib/action_view/renderer/partial_renderer.rb b/actionview/lib/action_view/renderer/partial_renderer.rb index ed8d5cf54e..dc85750a22 100644 --- a/actionview/lib/action_view/renderer/partial_renderer.rb +++ b/actionview/lib/action_view/renderer/partial_renderer.rb @@ -364,7 +364,7 @@ module ActionView 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 @@ module ActionView 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 diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb index 4aab3f913f..4cd8fc5bb2 100644 --- a/actionview/lib/action_view/renderer/template_renderer.rb +++ b/actionview/lib/action_view/renderer/template_renderer.rb @@ -71,7 +71,7 @@ module ActionView 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 |