aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/request/utils.rb8
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