This project is archived and is in readonly mode.
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 => '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.
Comments and changes to this ticket
-
Repository August 26th, 2009 @ 10:55 PM
- State changed from new to committed
(from [05b529ca57f75ce64540b9d34597e0c3bfe1fca7]) UrlRewriter#rewrite_url should call #to_param on the value given in :anchor option, just as #url_for does
[#2746 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/05b529ca57f75ce64540b9d34597e0... -
Repository August 26th, 2009 @ 10:55 PM
(from [4240890b28ea7d797d812202315ceeda55bac71e]) UrlRewriter#rewrite_url should call #to_param on the value given in :anchor option, just as #url_for does
[#2746 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/4240890b28ea7d797d812202315cee...
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 2746 UrlRewriter should call #to_param on the value given in :anchor [#2746 state:committed]
- 2746 UrlRewriter should call #to_param on the value given in :anchor [#2746 state:committed]