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
This commit is contained in:
David Heinemeier Hansson 2005-03-01 01:44:50 +00:00
parent 6b93952ae6
commit a29625fc80

@ -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)