Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize ActionController::Parameters#to_unsafe_h return value #20892

Merged

Conversation

zoltankiss
Copy link
Contributor

@sikachu per the comment (it refers to the method returning a hash) and that ActionController::Parameters#to_h returns a hash, should ActionController::Parameters#to_unsafe_h also return a hash as opposed to a ActiveSupport::HashWithIndifferentAccess, for consistency?

`ActionController::Parameters#to_h` returns a hash, so lets have
`ActionController::Parameters#to_unsafe_h` return a hash instead of
an `ActiveSupport::HashWithIndifferentAccess` for consistency.
@sikachu
Copy link
Member

sikachu commented Jul 16, 2015

I think this make sense. In the old implementation, we called #to_hash so that we will return an actual Hash object and not HWIA.

@spastorino would you mind merging this in?

rafaelfranca added a commit that referenced this pull request Jul 16, 2015
…consistent

Standardize `ActionController::Parameters#to_unsafe_h` return value
@rafaelfranca rafaelfranca merged commit 094571b into rails:master Jul 16, 2015
@zoltankiss zoltankiss deleted the make-params-method-returns-consistent branch July 16, 2015 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants