diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-21 17:57:50 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-21 17:57:50 -0700 |
commit | f620d6c25ef4d971a29e637e1a772cb5b12f2f26 (patch) | |
tree | c6a4c1769b66a666fbc1fe6e63bc09bc071c01da /actionpack/lib/action_dispatch/request | |
parent | 14e8377232adb3b92a84bb797915914bbbd75309 (diff) | |
download | rails-f620d6c25ef4d971a29e637e1a772cb5b12f2f26.tar.gz rails-f620d6c25ef4d971a29e637e1a772cb5b12f2f26.tar.bz2 rails-f620d6c25ef4d971a29e637e1a772cb5b12f2f26.zip |
stop keeping track of keys when "deep munging"
This should have been done along with 8f8ccb9901cab457c6e1d52bdb25acf658fd5777
Diffstat (limited to 'actionpack/lib/action_dispatch/request')
-rw-r--r-- | actionpack/lib/action_dispatch/request/utils.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/request/utils.rb b/actionpack/lib/action_dispatch/request/utils.rb index 1c9371d89c..8836ba6d59 100644 --- a/actionpack/lib/action_dispatch/request/utils.rb +++ b/actionpack/lib/action_dispatch/request/utils.rb @@ -7,19 +7,17 @@ module ActionDispatch class << self # Remove nils from the params hash - def deep_munge(hash, keys = []) + def deep_munge(hash) return hash unless perform_deep_munge hash.each do |k, v| - keys << k case v when Array - v.grep(Hash) { |x| deep_munge(x, keys) } + v.grep(Hash) { |x| deep_munge(x) } v.compact! when Hash - deep_munge(v, keys) + deep_munge(v) end - keys.pop end hash |