Philip Hallstrom wrote:
> I haven't tried it with a restful route, but I have a route like this:
> 
>      r.curriculum '/curriculum/:code/:title/:action',
>                   :defaults => { :action => 'overview' },
>                   :requirements => { :code => %r([\d.]+) }
> 
> :code is a float-like number.  11.123, etc.  The above :requirements
> part let's digits/dots through. Before I added that my memory is it
> complained like you say.
> 
> Perhaps you can work that into the restful route somehow...

Thanks Philip, I tried this tack but it doesn't work with a url where 
the id is at the end. If we have a path like:

/curriculum/12.1

the routing can't distinguish between id 12 with a format of 1 and an id 
of 12.1. This is compounded by the fact that my API clients need to be 
able to tack .xml on to the end of urls when they need an xml 
representation.

:(
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to