Permalink
Browse files

Fix deprecation warning for ParamsParser instance 😄

  • Loading branch information...
prathamesh-sonpatki committed Mar 30, 2016
1 parent 5ed3801 commit 317fbb037f3e5705fdf8467ab7af2014bd143ba3
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/middleware/params_parser.rb
@@ -37,7 +37,7 @@ def original_exception
# 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 self.new(app, parsers = {})
ActiveSupport::Deprecation.warn('ActionDispatch::ParamsParser is deprecated and you be removed in Rails 5.1. Configure the parameter parsing in ActionDispatch::Request.parameter_parsers.')
ActiveSupport::Deprecation.warn('ActionDispatch::ParamsParser is deprecated and will be removed in Rails 5.1. Configure the parameter parsing in ActionDispatch::Request.parameter_parsers.')
parsers = parsers.transform_keys { |key| key.respond_to?(:symbol) ? key.symbol : key }
ActionDispatch::Request.parameter_parsers = ActionDispatch::Request::DEFAULT_PARSERS.merge(parsers)
app

0 comments on commit 317fbb0

Please sign in to comment.