1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

View file

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