This project is archived and is in readonly mode.

#2746 ✓committed
Jeffrey Hardy

UrlRewriter should call #to_param on the value given in :anchor

Reported by Jeffrey Hardy | June 2nd, 2009 @ 08:07 PM | in 2.x

UrlWriter#url_for method calls #to_param on the value given via the :anchor option:

url_for(:host => '', :controller => 'comments', :anchor => Comment.first)
# => ""

but UrlRewriter#rewrite_url does not:

comments_url(:anchor => Comment.first)
# => "<Comment:0x37cc100>"

This patch makes #rewrite_url follow suit.

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