diff options
author | Vince DeVendra <vdevendra@patientslikeme.com> | 2018-03-24 12:23:37 -0400 |
---|---|---|
committer | Vince DeVendra <vdevendra@patientslikeme.com> | 2018-03-24 12:23:37 -0400 |
commit | d65d74b9158acf1ca79508a4ed49ffc712bdb983 (patch) | |
tree | 761f5a5f452173ae3b780225a93d6ceea6f84ee5 /activesupport/test/number_helper_test.rb | |
parent | ff6d498704cff88b823871d20c5dfcaa3345ead7 (diff) | |
download | rails-d65d74b9158acf1ca79508a4ed49ffc712bdb983.tar.gz rails-d65d74b9158acf1ca79508a4ed49ffc712bdb983.tar.bz2 rails-d65d74b9158acf1ca79508a4ed49ffc712bdb983.zip |
Make mutating params#dig mutate underlying params
When #dig was called on a params object and return either a Hash or an
Array, and that value was subsquently mutated, it would not modify the
containing params object. That means that the behavior of
`params.dig(:a, :b)[:c] = 1` did not match either `params[:a][:b][:c] =
1` nor `hash.dig(:a, :b)[:c] = 1`. Similarly to
`ActionController::Parameters#[]`, use `#convert_hashes_to_parameters`
to pre-convert values and insert them in the receiving params object
prior to returning them.
Diffstat (limited to 'activesupport/test/number_helper_test.rb')
0 files changed, 0 insertions, 0 deletions