Thanks to a chap I was chatting to in irc I''ve found what the problem
was
I had the default route before the named route so rails was taking
this first and creating the cached files in domain.com/home/about
rather than in domain.com/about.html
On Aug 12, 3:37 pm, teesea
<t.co...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I''m having difficultly getting simple page caching to work with
named
> routes. I have a named route called "about"
(urlwww.domain.com/about)
> which goes to the controller called "home" and an action called
> "about".
>
> When activating page caching by adding this to the home controller
>
> caches_page :about
>
> Rails creates the cached about page in "/home/about.html" instead
of
> in "/about.html". So every time a request comes in for the about
page
> the web server cant find the cached page and directs the request to
> rails.
>
> I''ve had a look around for anyone else having the same
difficulties
> and cant find anything, which probably means I''m missing something
> very obvious but cant think what.
>
> Any ideas?
>
> Cheers
>
> Teesea
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---