Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#2746

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

url_for(:host => 'www.example.com', :controller => 'comments', :anchor => Comment.first)
# => "http://www.example.com/comments#1"

but UrlRewriter#rewrite_url does not:

comments_url(:anchor => Comment.first)
# => "http://www.example.com/comments##<Comment:0x37cc100>"

This patch makes #rewrite_url follow suit.

Reported by Jeffrey Hardy · June 2nd, 2009 @ 08:07 PM

State: committed
Milestone: 2.x
Assigned to: nobody
Importance: none