Flowdock
method

parameter_parsers=

Importance_1
v6.1.3.1 - Show latest stable - 0 notes - Class: ClassMethods
parameter_parsers=(parsers) public

Configure the parameter parser for a given MIME type.

It accepts a hash where the key is the symbol of the MIME type and the value is a proc.

original_parsers = ActionDispatch::Request.parameter_parsers
xml_parser = -> (raw_post) { Hash.from_xml(raw_post) || {} }
new_parsers = original_parsers.merge(xml: xml_parser)
ActionDispatch::Request.parameter_parsers = new_parsers
Show source
Register or log in to add new notes.