From 5ed38014811d4ce6d6f957510b9153938370173b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 30 Mar 2016 01:16:49 -0300 Subject: Deprecate ActionDispatch::ParamsParser instance. Related with 38d2bf5fd1f3e014f2397898d371c339baa627b1. cc @tenderlove --- actionpack/CHANGELOG.md | 5 +++++ actionpack/lib/action_dispatch/middleware/params_parser.rb | 1 + 2 files changed, 6 insertions(+) (limited to 'actionpack') diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 97ce7ffc75..4f5b81d04a 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,3 +1,8 @@ +* `ActionDispatch::ParamsParser` is deprecated and was removed from the middleware + stack. To configure the parameter parsers use `ActionDispatch::Request.parameter_parsers=`. + + *tenderlove* + * When a `respond_to` collector with a block doesn't have a response, then a `:no_content` response should be rendered. This brings the default rendering behavior introduced by https://github.com/rails/rails/issues/19036 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 -- cgit v1.2.3