提交 d41d7a42 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #25826 from javan/actionview/trim-digestor-template-lookups

Eliminate extra template lookup in ActionView::Digestor
......@@ -41,8 +41,7 @@ def tree(name, finder, partial = false, seen = {})
options = {}
options[:formats] = [finder.rendered_format] if finder.rendered_format
if finder.disable_cache { finder.exists?(logical_name, [], partial, [], options) }
template = finder.disable_cache { finder.find(logical_name, [], partial, [], options) }
if template = finder.disable_cache { finder.find_all(logical_name, [], partial, [], options).first }
finder.rendered_format ||= template.formats.first
if node = seen[template.identifier] # handle cycles in the tree
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册