未验证 提交 7fe7e741 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #35758 from Shigeyuki-fukuda/aligned_order_of_argument

Aligned the order of the arguments of render_template and render_with_layout
......@@ -49,14 +49,14 @@ def determine_template(options)
# 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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册