提交 c63f3bdc 编写于 作者: J Jeremy Kemper

Inline commonly-called template presence checks. Closes #2882.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 ede50559
*SVN*
* Performance tweaks: use Set instead of Array to speed up prototype helper include? calls. Avoid logging code if logger is nil. #2880, #2881 [Stefan Kaes]
* Performance tweaks: use Set instead of Array to speed up prototype helper include? calls. Avoid logging code if logger is nil. Inline commonly-called template presence checks. #2880, #2881, #2882 [Stefan Kaes]
* MemCache store may be given multiple addresses. #2869 [Ryan Carver <ryan@fivesevensix.com>]
......
......@@ -273,9 +273,9 @@ def compile_and_render_template(extension, template = nil, file_path = nil, loca
def pick_template_extension(template_path)#:nodoc:
if match = delegate_template_exists?(template_path)
match.first
elsif erb_template_exists?(template_path)
elsif template_exists?(template_path, :rhtml)
'rhtml'
elsif builder_template_exists?(template_path)
elsif template_exists?(template_path, :rxml)
'rxml'
else
raise ActionViewError, "No rhtml, rxml, or delegate template found for #{template_path}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册