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.

Use default_url_options in polymorphic_url

#5291

Although url_for in ActionDispatch::Routing::UrlFor uses default_url_options to make URL, polymorphic_url in ActionDispatch::Routing::PolymorphicRoutes does not use. When I set up default_url_options, the following calls of url_for and new_user_path makes different result.

default_url_options[:ver] = "rails"
url_for(:controller => "users", :action => "index", :id => 1) #=> "/users/1?ver=rails3"
new_user_path #=> "/users/1"

The patch is attached. This is important to jpmobile, de-facto standard Rails plugin for Japanese mobile phone, to use polymorphic_url on mobile phone that can't handle Cookie by setting session_id and session_key to default_url_options.

Reported by Rust/OGAWA · August 4th, 2010 @ 08:06 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Rust/OGAWA
    Rust/OGAWA

    Please close this ticket. Because this problem occurs only in IntegrationTest. And the patch does not totally resolve this problem.

    August 5th, 2010 @ 05:21 PM

  2. Andrew White
    Andrew White
    • State changed from new to invalid
    • Importance changed from to Low

    August 20th, 2010 @ 08:07 AM