diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-03-26 22:01:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-26 22:01:18 -0400 |
commit | 7fe7e7417112a9e8e0f1b0b81f31047ab01a1096 (patch) | |
tree | a9060c9abde681470d5a9a760966136d0d0e1e9d /actionview/lib/action_view | |
parent | 00690b27e5c3b1beaa9f6e73fec9e9a1c639f748 (diff) | |
parent | c546f9040e5bcc87c9dfa785d9d93af17fb5174b (diff) | |
download | rails-7fe7e7417112a9e8e0f1b0b81f31047ab01a1096.tar.gz rails-7fe7e7417112a9e8e0f1b0b81f31047ab01a1096.tar.bz2 rails-7fe7e7417112a9e8e0f1b0b81f31047ab01a1096.zip |
Merge pull request #35758 from Shigeyuki-fukuda/aligned_order_of_argument
Aligned the order of the arguments of render_template and render_with_layout
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/renderer/template_renderer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/renderer/template_renderer.rb b/actionview/lib/action_view/renderer/template_renderer.rb index 83b990b081..9548fe12c4 100644 --- a/actionview/lib/action_view/renderer/template_renderer.rb +++ b/actionview/lib/action_view/renderer/template_renderer.rb @@ -49,14 +49,14 @@ module ActionView # Renders the given template. A string representing the layout can be # supplied as well. def render_template(view, template, layout_name, locals) - render_with_layout(view, layout_name, template, locals) do |layout| + render_with_layout(view, template, layout_name, locals) do |layout| instrument(:template, identifier: template.identifier, layout: layout.try(:virtual_path)) do template.render(view, locals) { |*name| view._layout_for(*name) } end end end - def render_with_layout(view, path, template, locals) + def render_with_layout(view, template, path, locals) layout = path && find_layout(path, locals.keys, [formats.first]) content = yield(layout) |