diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-11-22 05:01:07 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-11-22 05:01:07 +0000 |
commit | 155eb47cf3a815306c5c9b6fcd254b838fc26b5c (patch) | |
tree | 43e90b9c2d0e7d805c7f42ccb9dd760e9654ef65 /actionpack/lib/action_view | |
parent | 9afbf875ebd038da003a6ebb8d2540955616f549 (diff) | |
download | rails-155eb47cf3a815306c5c9b6fcd254b838fc26b5c.tar.gz rails-155eb47cf3a815306c5c9b6fcd254b838fc26b5c.tar.bz2 rails-155eb47cf3a815306c5c9b6fcd254b838fc26b5c.zip |
Tests and fix for extension extraction. References #10130 [tarmo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8187 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 81a8299e91..d73fb643e8 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -516,8 +516,7 @@ module ActionView #:nodoc: # Determine the template extension from the <tt>@first_render</tt> filename def find_template_extension_from_first_render - extension = @first_render.to_s.sub /^\w+\.?/, '' - extension.blank? ? nil : extension + File.basename(@first_render.to_s)[/^[^.]+\.(.+)$/, 1] end # This method reads a template file. |