aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorShigeyuki-fukuda <urbansonnet1990@gmail.com>2019-03-25 00:13:20 +0900
committerShigeyuki-fukuda <urbansonnet1990@gmail.com>2019-03-27 01:09:34 +0900
commitc546f9040e5bcc87c9dfa785d9d93af17fb5174b (patch)
tree2cfbad13e4644cfd45bc74e45ed4ff938f70bef9 /actionview
parent3296dc258960aa3289a3a9a6d118d3ef40089bd9 (diff)
downloadrails-c546f9040e5bcc87c9dfa785d9d93af17fb5174b.tar.gz
rails-c546f9040e5bcc87c9dfa785d9d93af17fb5174b.tar.bz2
rails-c546f9040e5bcc87c9dfa785d9d93af17fb5174b.zip
Aligned the order of the arguments of render_template and render_with_layout
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/renderer/template_renderer.rb4
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)