diff options
author | Patrick Toomey <ptoomey3@biasedcoin.com> | 2019-05-31 07:49:28 -0600 |
---|---|---|
committer | Patrick Toomey <ptoomey3@biasedcoin.com> | 2019-05-31 07:49:28 -0600 |
commit | 1d7fa920bf3bb4496f4782de6128029f3ecd4a62 (patch) | |
tree | e29b754b8ad5031dee812580fce7cd1ba1697083 /guides/w3c_validator.rb | |
parent | 06992d50522c5dd2e7fa26bc257cc416b7f47cc8 (diff) | |
download | rails-1d7fa920bf3bb4496f4782de6128029f3ecd4a62.tar.gz rails-1d7fa920bf3bb4496f4782de6128029f3ecd4a62.tar.bz2 rails-1d7fa920bf3bb4496f4782de6128029f3ecd4a62.zip |
Recursively process arrays consistently
Based on the way parameters are currently processed, a parameter value of type Hash is recursively processed. For a value of type Array however, the current behavior is to simply return the original array, with no filtering. It is not clear what the expected behavior should be. But, doing nothing seems incorrect, since it bypasses custom Proc based parameter filtering all together for arrays of values. This change processes values of type Array consistently. We map over the values and recursively call value_for_key on them. This still works with values of type Hash, since value_for_key already knows how to process Hash values.
Diffstat (limited to 'guides/w3c_validator.rb')
0 files changed, 0 insertions, 0 deletions