Re: Routing: How do I use what is left from an URL

Alexey Verkhovsky
Sat, 19 Feb 2005 14:24:44 -0000

Sascha Ebach wrote:

> /-/articles/ruby/rails/WTSCMSTCPBUWROR
> I don''t know how long the path is going to be. The page could lie
in
> root or have several directory levels.
> As soon as I try to use the above route I get a routing error.

I have a similar problem, and the only available solution to handle a
variable number of slashes as of two days ago was to escape them, so
your path becomes something like:

articles/ruby%2Frails%2FWTSCMSTCPBUWROR

Not nice, I know.

There is some commit in the trunk that enables Routes to deal with
regexps. I haven''t looked at it closely yet. It may cope with this
problem, I don''t know.

Ulysses: see? Another unsatisfied customer who wants
'':foo/:bar...''
mapping :)

--
Best regards,

Alexey Verkhovsky

Ruby Forum: http://ruby-forum.org        (moderator)
RForum:     http://rforum.andreas-s.net  (co-author)
Instiki:    http://instiki.org           (maintainer)