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:
parent
6b93952ae6
commit
a29625fc80
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue