Rails caches_page :index in Wrong Location
        Posted  
        
            by Andy
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Andy
        
        
        
        Published on 2010-04-12T13:09:01Z
        Indexed on 
            2010/04/12
            13:13 UTC
        
        
        Read the original article
        Hit count: 290
        
I have a controller Projects in my Rails app with:
caches_page :index
However, instead of the cached file being generated at /public/projects/index.html it is located at /public/projects.html.
The web server (currently Mongrel) looks for */ directories before *.html files. So the http://…/projects request is routed through Rails and my index cache file is never served.
How can I tell caches_page :index to generate the file at /public/projects/index.html instead?
© Stack Overflow or respective owner