This project is archived and is in readonly mode.

#3738 ✓invalid
Sam Saffron

Breaking change in request.path_parameters

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

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.

Comments and changes to this ticket

  • Ryan Bigg

    Ryan Bigg June 12th, 2010 @ 03:24 AM

    • State changed from “new” to “invalid”

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

  • Evgeniy Dolzhenko

    Evgeniy Dolzhenko August 26th, 2010 @ 08:49 AM

    • 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.

  • Andrew White

    Andrew White August 26th, 2010 @ 10:18 AM

    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.

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>

Pages