Forum: Ruby on Rails routes and caching

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dorian M. (Guest)
on 2006-03-29 19:15
(Received via mailing list)
Hi there,

I have the following route in my routes file:

  # - all film sub-pages (defaulting to index.html)
  map.connect 'films/:film_title/:page',
              :controller   => 'films',
              :action       => 'show',
              :page         => 'index.html'

which will pick up URLs like this:
/films/filmname/
/films/filmname/index.html
/films/filmname/biography.html
defaulting to index.html when no :page is specified.

I know this route is being picked up and rendered properly, but when I
try and cache it I can't get it to save the /films/filmname/ as
/films/filmname/index.html, instead I always get /films/filmname.html.
On top of this, although filmname.html file is cached, it still gets
rendered and recached on every request(other pages all work fine).

Does anyone know how I can somehow bind /film/filmname/ to
/film/filmname/index.html?
This is in rails 1.0

many thanks

dorian
This topic is locked and can not be replied to.