Class: ActionPack::XmlParser

Inherits:
Object
  • Object
show all
Defined in:
lib/action_pack/xml_parser.rb,
lib/action_pack/xml_parser/railtie.rb,
lib/action_pack/xml_parser/version.rb

Defined Under Namespace

Classes: Railtie

Constant Summary collapse

VERSION =
"2.0.1"

Class Method Summary collapse

Class Method Details

.call(raw_post) ⇒ Object



14
15
16
# File 'lib/action_pack/xml_parser.rb', line 14

def self.call(raw_post)
  Hash.from_xml(raw_post) || {}
end

.registerObject



9
10
11
12
# File 'lib/action_pack/xml_parser.rb', line 9

def self.register
  original_parsers = ActionDispatch::Request.parameter_parsers
  ActionDispatch::Request.parameter_parsers = original_parsers.merge(Mime[:xml].symbol => self)
end