Class: ActionDispatch::ParamsParser
- Defined in:
- actionpack/lib/action_dispatch/middleware/params_parser.rb
Constant Summary collapse
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, parsers = {}) ⇒ ParamsParser
constructor
A new instance of ParamsParser.
Constructor Details
#initialize(app, parsers = {}) ⇒ ParamsParser
Returns a new instance of ParamsParser.
12 13 14 |
# File 'actionpack/lib/action_dispatch/middleware/params_parser.rb', line 12 def initialize(app, parsers = {}) @app, @parsers = app, DEFAULT_PARSERS.merge(parsers) end |
Instance Method Details
#call(env) ⇒ Object
16 17 18 19 20 21 22 |
# File 'actionpack/lib/action_dispatch/middleware/params_parser.rb', line 16 def call(env) if params = parse_formatted_parameters(env) env["action_dispatch.request.request_parameters"] = params end @app.call(env) end |