Skip to content
This repository has been archived by the owner on Aug 17, 2017. It is now read-only.

Don't mutate the original object when using ActionController::Parameters#fetch #184

Closed
wants to merge 1 commit into from

Conversation

jondeandres
Copy link

The ActionController::Parameters#fetch doesn't work in the same way that Hash#fetch and mutates the original object, what may cause problems in some applications. This PR defines ActionController::Parameters#convert_hashes_to_parameters! having the same past behaviour but redefines ActionController::Parameters#convert_hashes_to_parameters to not mutate the original object.

…ers#fetch.

The ActionController::Parameters#fetch doesn't work in the same way that Hash#fetch and mutates the original object, what may cause problems in some applications. This PR defines ActionController::Parameters#convert_hashes_to_parameters! having the same past behaviour but redefines ActionController::Parameters#convert_hashes_to_parameters to not mutate the original object.
@jondeandres
Copy link
Author

This is solved in #102, I close this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant