diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-03-30 01:16:49 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-03-30 01:17:05 -0300 |
commit | 5ed38014811d4ce6d6f957510b9153938370173b (patch) | |
tree | 5d9e6552cd97bb163205466afab5801841d43300 /actionpack/lib | |
parent | 3be1a75f3fff1042934ba60ae4093237a6b31712 (diff) | |
download | rails-5ed38014811d4ce6d6f957510b9153938370173b.tar.gz rails-5ed38014811d4ce6d6f957510b9153938370173b.tar.bz2 rails-5ed38014811d4ce6d6f957510b9153938370173b.zip |
Deprecate ActionDispatch::ParamsParser instance.
Related with 38d2bf5fd1f3e014f2397898d371c339baa627b1.
cc @tenderlove
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/params_parser.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/params_parser.rb b/actionpack/lib/action_dispatch/middleware/params_parser.rb index 5841c978af..683c5ffa3e 100644 --- a/actionpack/lib/action_dispatch/middleware/params_parser.rb +++ b/actionpack/lib/action_dispatch/middleware/params_parser.rb @@ -37,6 +37,7 @@ 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 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.') parsers = parsers.transform_keys { |key| key.respond_to?(:symbol) ? key.symbol : key } ActionDispatch::Request.parameter_parsers = ActionDispatch::Request::DEFAULT_PARSERS.merge(parsers) app |