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.

Breaking change in request.path_parameters

#3738

In rails 2.3.5 request.path_parameters goes from string to string eg: {"action" => "foo", "controller" => "bar"}

In rails 3 request.path_parameters goes from symbol to string eg: {:action => "foo", :controller => "bar"}

Even though its more efficient this change regresses some places the depend on a parity between path_parameters and params since params still goes from string to string.

There should be parity here or it will cause confusion.

Reported by Sam Saffron · January 18th, 2010 @ 01:12 PM

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

Activity

  1. Ryan Bigg
    Ryan Bigg
    • State changed from new to invalid

    request.path_parameters is a HashWithIndifferentAccess object, as is params. There is no disparity.

    June 12th, 2010 @ 03:24 AM

  2. Evgeniy Dolzhenko
    Evgeniy Dolzhenko
    • Importance changed from to Low

    Just tested that on RC2 and request.path_parameters is definitely just a Hash (not HashWithIndifferentAccess) with symbols as keys.

    August 26th, 2010 @ 08:49 AM

  3. Andrew White
    Andrew White

    I'm pretty sure that this is intentional as there is symbolized_path_parameters. I suspect the change came about because path_parameters is stored in the rack environment hash.

    August 26th, 2010 @ 10:18 AM