aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r--actionpack/lib/action_view/base.rb3
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.