diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-02-22 21:39:44 -0300 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-02-22 21:39:44 -0300 |
commit | e7299497871e20c3a28516a4e84fe1789c8795a8 (patch) | |
tree | c60aec696d0e74ffe0f0efbc8a2a17c8280f473e /actionpack/lib/action_controller | |
parent | 7a36686c115f1c6c60ac0a51bc4991c3d32b6e5d (diff) | |
parent | 4f30df4b524b5da22491090e22f5c2de789dd016 (diff) | |
download | rails-e7299497871e20c3a28516a4e84fe1789c8795a8.tar.gz rails-e7299497871e20c3a28516a4e84fe1789c8795a8.tar.bz2 rails-e7299497871e20c3a28516a4e84fe1789c8795a8.zip |
Merge pull request #23816 from rails/params_parser_api
Make sure the parameter parsers register API work with overidden mime types.
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 0c4b661214..700317614f 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -52,7 +52,7 @@ module ActionController self.session = session self.session_options = TestSession::DEFAULT_OPTIONS @custom_param_parsers = { - Mime[:xml] => lambda { |raw_post| Hash.from_xml(raw_post)['hash'] } + xml: lambda { |raw_post| Hash.from_xml(raw_post)['hash'] } } end @@ -105,7 +105,7 @@ module ActionController when :url_encoded_form data = non_path_parameters.to_query else - @custom_param_parsers[content_mime_type] = ->(_) { non_path_parameters } + @custom_param_parsers[content_mime_type.symbol] = ->(_) { non_path_parameters } data = non_path_parameters.to_query end end |