aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-09-18 13:03:07 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-09-18 13:03:07 -0700
commita1ced8b52ce60d0634e65aa36cb89f015f9f543d (patch)
tree22379c807f1040ba345c85bf65f07e93fb47a2b2 /actionpack/lib
parentb93c226d19615fe504f9e12d6c0ee2d70683e5fa (diff)
downloadrails-a1ced8b52ce60d0634e65aa36cb89f015f9f543d.tar.gz
rails-a1ced8b52ce60d0634e65aa36cb89f015f9f543d.tar.bz2
rails-a1ced8b52ce60d0634e65aa36cb89f015f9f543d.zip
do not instantiate a param parser middleware
we don't actually need a param parser middleware instance since the request object will take care of parsing parameters for us. For now, we'll just configure the parameter parsers on the request in this class.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/middleware/params_parser.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/params_parser.rb b/actionpack/lib/action_dispatch/middleware/params_parser.rb
index ef55401015..18af0a583a 100644
--- a/actionpack/lib/action_dispatch/middleware/params_parser.rb
+++ b/actionpack/lib/action_dispatch/middleware/params_parser.rb
@@ -22,13 +22,9 @@ module ActionDispatch
#
# The +parsers+ argument can take Hash of parsers where key is identifying
# content mime type, and value is a lambda that is going to process data.
- def initialize(app, parsers = {})
- @app = app
+ def self.new(app, parsers = {})
ActionDispatch::Request.parameter_parsers = ActionDispatch::Request::DEFAULT_PARSERS.merge(parsers)
- end
-
- def call(env)
- @app.call(env)
+ app
end
end
end