Added ActionController::Parameters.each_value methods#33979
Added ActionController::Parameters.each_value methods#33979rafaelfranca merged 1 commit intorails:masterfrom
Conversation
|
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @eileencodes (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review. Please see the contribution instructions for more information. |
There was a problem hiding this comment.
I see a left over. To be removed.
There was a problem hiding this comment.
I'm confused. Do you mean you need to add this back or this was left over in a previous PR? It looks like from the example below that the keys are strings.
There was a problem hiding this comment.
Sorry I mean, I am going to remove this hunk in the next rebase. Let's do this.
|
We don't want to make Parameters support all Hash values. I'm fine with each keys but each values will skip the parameters protection that we want to enforce. If you want to use those method please transform the parameters in hash using |
|
Although we already have |
|
Forget about that, changing behaviour of |
|
Rebased: new implementation of only |
`each_value` should yield with "value" of the params instead of "value" as an array. Related to rails#33979
Added ActionController::Parameters.each_value methods rails/rails#33979
Added ActionController::Parameters.each_value methods rails/rails#33979
Although Parameters class is far from implementing Hash and it's obvious that
it's not primarly goal to achieve it, having the two convinient methods for
iterating through parameters makes it more quacking like Hash: