Navigation Menu

Skip to content

Commit

Permalink
Deprecate ActionDispatch::ParamsParser instance.
Browse files Browse the repository at this point in the history
Related with 38d2bf5.

cc @tenderlove
  • Loading branch information
rafaelfranca committed Mar 30, 2016
1 parent 3be1a75 commit 5ed3801
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 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 * 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 a `:no_content` response should be rendered. This brings the default
rendering behavior introduced by https://github.com/rails/rails/issues/19036 rendering behavior introduced by https://github.com/rails/rails/issues/19036
Expand Down
1 change: 1 addition & 0 deletions actionpack/lib/action_dispatch/middleware/params_parser.rb
Expand Up @@ -37,6 +37,7 @@ def original_exception
# The +parsers+ argument can take Hash of parsers where key is identifying # 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. # content mime type, and value is a lambda that is going to process data.
def self.new(app, parsers = {}) 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 } parsers = parsers.transform_keys { |key| key.respond_to?(:symbol) ? key.symbol : key }
ActionDispatch::Request.parameter_parsers = ActionDispatch::Request::DEFAULT_PARSERS.merge(parsers) ActionDispatch::Request.parameter_parsers = ActionDispatch::Request::DEFAULT_PARSERS.merge(parsers)
app app
Expand Down

1 comment on commit 5ed3801

@tenderlove
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ™‡πŸ»πŸ™‡πŸ»πŸ™‡πŸ»πŸ™‡πŸ»πŸ™‡πŸ»

Please sign in to comment.