aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/base.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-11-16 09:03:00 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-11-16 09:03:00 +0000
commitc63f3bdc7af1ed1195d6fae4dfcdfd621638ab4d (patch)
treeb003b0446eb066fbfa7435d31acddc01d59e7001 /actionpack/lib/action_view/base.rb
parentede505592cfab0212e53ca8ad1c38026a7b5d042 (diff)
downloadrails-c63f3bdc7af1ed1195d6fae4dfcdfd621638ab4d.tar.gz
rails-c63f3bdc7af1ed1195d6fae4dfcdfd621638ab4d.tar.bz2
rails-c63f3bdc7af1ed1195d6fae4dfcdfd621638ab4d.zip
Inline commonly-called template presence checks. Closes #2882.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r--actionpack/lib/action_view/base.rb4
1 files changed, 2 insertions, 2 deletions
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}"