This project is archived and is in readonly mode.

#172 ✓resolved
Sven Fuchs

Altered Rails Route Globbing breaks when non-strings passed

Reported by Sven Fuchs | May 12th, 2008 @ 07:27 PM

Not sure about the this consequences of this, but ...

Ticket #144 implemented in 6776edccf6fb553eb0ac6db55e1d30df1b5b6589 calls URI.escape on path_component which breaks when path_component is not a String.

E.g. I have a named route url helper containing a *permalink pathsegment to which I pass an array like: [published_at.year, published_at.month,, id]. (This worked in 2.0.2)

This breaks with:

private method `gsub' called for 2008:Fixnum

/usr/local/lib/ruby/1.8/uri/common.rb:289:in `escape'

The solution could be to call #to_s on path_component before passing it to URI.escape.

Attached patch implements this change.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket