From a29625fc801482229948155e8735cb163ded3916 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 1 Mar 2005 01:44:50 +0000 Subject: Fixed caching to be aware of extensions (so you can cache files like api.wsdl or logo.png) #734 [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/caching.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index cde5b4f1e9..e8200f6ded 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -90,7 +90,9 @@ module ActionController #:nodoc: private def page_cache_file(path) - ((path.empty? || path == "/") ? "/index" : path) + ".html" + name = ((path.empty? || path == "/") ? "/index" : path) + name << '.html' unless path.split('/').last.include? '.' + return name end def page_cache_path(path) -- cgit v1.2.3