A place where the Joyent community can gather, help each other out, and stay informed.
You are not logged in.
Tonight i discovered that, with Rails 1.2, periods in urls don't work to well. After a little research i discovered the reason for that is because a period is now considered a separator in the route maps.
I have tried to work around this by using the :requirements hash in the routes.config. The best i could come up with is something like:
map.connect '/wiki/pages/:id', :controller => 'wiki_pages',
:action => 'show',
:requirements => {:id => /[+.a-zA-Z0-9]+/}
Were :id is the page title and titles are currently allowed to have periods in them. This doesn't work. I am not even sure this is the right path to head down.
Does anyone have any experience with this issue? Any insight would be wonderful.
Last edited by dabux (2007-01-18 07:17:14)
Offline
The freshly released notes for 1.2 suggest doing something like
map.connect '/wiki/pages/:id', :controller => 'wiki_pages', :action => 'show', :requirements => { :id => /.*/ }
based on the route you've shown. A more traditional approach would be something like
map.connect '/wiki/pages/:id', :controller => 'wiki', :action => 'pages', :requirements => { :id => /.*/ }
but I presume you know what you're doing with your controllers and actions.
Offline
Well I had some problems with the breakpointer.. but breakpointer replacement I use ruby-debug http://rubyforge.org/projects/ruby-debug/...Exact same functionality as the drb breakpointer with some extra features.More info: www.datanoise.com/ruby-debug/
Hope it's helpful.
Cheers
Offline