diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-01 01:44:50 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-01 01:44:50 +0000 |
commit | a29625fc801482229948155e8735cb163ded3916 (patch) | |
tree | 0cc9497f4db646e119f31787719da2c789722b16 /actionpack/lib | |
parent | 6b93952ae6866a82adccc3a8c8d022f3ac674c59 (diff) | |
download | rails-a29625fc801482229948155e8735cb163ded3916.tar.gz rails-a29625fc801482229948155e8735cb163ded3916.tar.bz2 rails-a29625fc801482229948155e8735cb163ded3916.zip |
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
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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) |