diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-18 15:36:55 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-18 15:36:55 -0700 |
commit | 38d2bf5fd1f3e014f2397898d371c339baa627b1 (patch) | |
tree | deb693f38ee9b8e1892d813d0a0e3eb35f20aa28 /guides/source/api_app.md | |
parent | a9334616120cffb560017e6a563ad401e425602b (diff) | |
download | rails-38d2bf5fd1f3e014f2397898d371c339baa627b1.tar.gz rails-38d2bf5fd1f3e014f2397898d371c339baa627b1.tar.bz2 rails-38d2bf5fd1f3e014f2397898d371c339baa627b1.zip |
mostly remove the ParamsParser middleware
This can still be added to the middleware stack, but is really not
necessary. I'll follow up with a commit that deprecates the constant
Diffstat (limited to 'guides/source/api_app.md')
-rw-r--r-- | guides/source/api_app.md | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/guides/source/api_app.md b/guides/source/api_app.md index 28727a51bd..feaaff166a 100644 --- a/guides/source/api_app.md +++ b/guides/source/api_app.md @@ -194,7 +194,6 @@ An API application comes with the following middlewares by default: - `ActionDispatch::RemoteIp` - `ActionDispatch::Reloader` - `ActionDispatch::Callbacks` -- `ActionDispatch::ParamsParser` - `Rack::Head` - `Rack::ConditionalGet` - `Rack::ETag` @@ -292,9 +291,9 @@ instructions in the `Rack::Sendfile` documentation. NOTE: The `Rack::Sendfile` middleware is always outside of the `Rack::Lock` mutex, even in single-threaded applications. -### Using ActionDispatch::ParamsParser +### Using ActionDispatch::Request -`ActionDispatch::ParamsParser` will take parameters from the client in the JSON +`ActionDispatch::Request#params` will take parameters from the client in the JSON format and make them available in your controller inside `params`. To use this, your client will need to make a request with JSON-encoded parameters @@ -313,7 +312,7 @@ jQuery.ajax({ }); ``` -`ActionDispatch::ParamsParser` will see the `Content-Type` and your parameters +`ActionDispatch::Request` will see the `Content-Type` and your parameters will be: ```ruby |