Permalink
Browse files

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
  • Loading branch information...
1 parent 6b93952 commit a29625fc801482229948155e8735cb163ded3916 @dhh dhh committed Mar 1, 2005
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionpack/lib/action_controller/caching.rb
@@ -90,7 +90,9 @@ def caches_page(*actions)
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)

0 comments on commit a29625f

Please sign in to comment.