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.

Controller params should be accessible with both string and symbol?

#2422

Is there any particular reason that the controller (request) params are only accessible as strings? It would help a lot in development, if the params hash is a HashWithIndifferentAccess.

Reported by avijayr (at gmail) · April 5th, 2009 @ 06:33 PM

State: invalid
Milestone: 2.x
Assigned to: Ryan Bigg Ryan Bigg
Importance: none

Activity

  1. Rishav Rastogi
    Rishav Rastogi
    • Assigned user set to Ryan Bigg

    We can do this. if you mean params[:user] or params["user"].

    Incomplete. Seems invalid though

    April 10th, 2010 @ 11:55 PM

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

    Yes, in all versions of Rails for as long as I recall params is a HashWithIndifferentAccess.

    April 10th, 2010 @ 11:56 PM