I have added the new map.connect in routes.rb like this
map.connect ‘:controller/:action/:id/:page’
but it seems like the cache_pages only create the
controller_name/action_name/id.html file in the public directory.
and I expect the controller_name/action_name/id/page.html
for different id number the rails create a series page number html files
in a directory named with the id.
What should I do?
I have search for a few days and can’t find the answer.
Could anyone help me?
Hi –
On Thu, 15 Nov 2007, Hongliang Zhang wrote:
for different id number the rails create a series page number html files
in a directory named with the id.
What should I do?
I have search for a few days and can’t find the answer.
Could anyone help me?
Where in your routes.rb file do you have that route? I’m wondering
whether another route is matching first.
Here’s what I did to simulate what you’ve got:
map.connect ‘:controller/:action/:id/:extra’
and then connected to:
http://localhost:3000/items/show/1/extra
and I got this file created:
public/items/show/1/extra.html
So it should work, which makes me think maybe it’s a route ordering
problem.
David
–
Upcoming training by David A. Black/Ruby Power and Light, LLC:
- Advancing With Rails, Berlin, Germany, November 19-22
- Intro to Rails, London, UK, December 3-6 (by Skills Matter)
See http://www.rubypal.com for details!
Thanks David.
You are right. now the cache pages are created.
Thank you very much for your help.