diff options
author | Bernard Potocki <bernard.potocki@imanel.org> | 2013-12-05 12:08:34 +0100 |
---|---|---|
committer | Bernard Potocki <bernard.potocki@imanel.org> | 2013-12-05 12:08:34 +0100 |
commit | e8572cf2f94872d81e7145da31d55c6e1b074247 (patch) | |
tree | 71e189336045cd62ef04ace0a571d8ef7169fa93 /actionpack/lib/action_dispatch/request | |
parent | 67998001b60e2bb960d8776266fb7a56fa6be2ba (diff) | |
download | rails-e8572cf2f94872d81e7145da31d55c6e1b074247.tar.gz rails-e8572cf2f94872d81e7145da31d55c6e1b074247.tar.bz2 rails-e8572cf2f94872d81e7145da31d55c6e1b074247.zip |
Add configuration option to optionally disable deep_munge
Diffstat (limited to 'actionpack/lib/action_dispatch/request')
-rw-r--r-- | actionpack/lib/action_dispatch/request/utils.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/request/utils.rb b/actionpack/lib/action_dispatch/request/utils.rb index 8b43cdada8..a6dca9741c 100644 --- a/actionpack/lib/action_dispatch/request/utils.rb +++ b/actionpack/lib/action_dispatch/request/utils.rb @@ -1,9 +1,15 @@ module ActionDispatch class Request < Rack::Request class Utils # :nodoc: + + mattr_accessor :perform_deep_munge + self.perform_deep_munge = true + class << self # Remove nils from the params hash def deep_munge(hash) + return hash unless perform_deep_munge + hash.each do |k, v| case v when Array |