From c63f3bdc7af1ed1195d6fae4dfcdfd621638ab4d Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 16 Nov 2005 09:03:00 +0000 Subject: Inline commonly-called template presence checks. Closes #2882. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view/base.rb') diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index e5dea1bae2..83bb318ce5 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -273,9 +273,9 @@ module ActionView #:nodoc: 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}" -- cgit v1.2.3