Ruby on Rails Monday, February 29, 2016

On Mon, Feb 29, 2016 at 3:04 PM, digger250 <digger250@gmail.com> wrote:
> I'm trying to figure out how to escape a literal colon in the routes. If I
> make a route like this:
>
> get '/thing:/:id' => 'things#show'
>
> then '/thing:/123' does not match on this route
>
> I've also tried '/thing\:/:id' and '/thing%3A/:id' none seem to work.
>
> Does anyone have any tips here?

Yes - don't do that :-)

See https://www.ietf.org/rfc/rfc1738.txt, specifically Section 2.2 on
reserved characters.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yDceABV646sh%2BH5L4uWoW%3D1Scc2ucj6ta4tYLU_q8JmRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment