Class: ActionDispatch::ParamsParser
Relationships & Source Files | |
Namespace Children | |
Exceptions:
| |
Inherits: | Object |
Defined in: | actionpack/lib/action_dispatch/middleware/params_parser.rb |
Constant Summary
-
DEFAULT_PARSERS =
# File 'actionpack/lib/action_dispatch/middleware/params_parser.rb', line 16{ Mime::JSON => :json }
Class Method Summary
- .new(app, parsers = {}) ⇒ ParamsParser constructor
Instance Method Summary
Constructor Details
.new(app, parsers = {}) ⇒ ParamsParser
# File 'actionpack/lib/action_dispatch/middleware/params_parser.rb', line 18
def initialize(app, parsers = {}) @app, @parsers = app, DEFAULT_PARSERS.merge(parsers) end
Instance Method Details
#call(env)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/params_parser.rb', line 22
def call(env) if params = parse_formatted_parameters(env) env["action_dispatch.request.request_parameters"] = params end @app.call(env) end