Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup the Rails 4.1 compatibility patch

  • Loading branch information...
commit d68697c780d40365be0d1f81d09027858dd2d6f1 1 parent 7183c91
@dhh dhh authored
Showing with 3 additions and 7 deletions.
  1. +3 −7 lib/action_dispatch/xml_params_parser.rb
View
10 lib/action_dispatch/xml_params_parser.rb
@@ -26,14 +26,10 @@ def parse_formatted_parameters(env)
request.content_mime_type
if mime_type == Mime::XML
- if defined?(::ActionDispatch::Request::Utils)
- # Rails 4.1
- data = Request::Utils.deep_munge(Hash.from_xml(request.body.read) || {})
- else
- # Rails 4.0
- data = request.deep_munge(Hash.from_xml(request.body.read) || {})
- end
+ # Rails 4.1 moved #deep_munge out of the request and into ActionDispatch::Request::Utils
+ munger = defined?(Request::Utils) ? Request::Utils : request
+ data = munger.deep_munge(Hash.from_xml(request.body.read) || {})
data.with_indifferent_access
else
false
Please sign in to comment.
Something went wrong with that request. Please try again.