diff options
author | Alex Johnson <notalexjohnson@gmail.com> | 2013-11-13 13:23:09 +0530 |
---|---|---|
committer | Alex Johnson <notalexjohnson@gmail.com> | 2013-11-13 13:30:58 +0530 |
commit | 006f710361f86c81bbcbb04e12aae78d04651622 (patch) | |
tree | f3ffb07e74bd317027c6b17d7f8b68e60327790d /guides/source | |
parent | b9a4560d91d382600164e69cf98d8eb6688447df (diff) | |
download | rails-006f710361f86c81bbcbb04e12aae78d04651622.tar.gz rails-006f710361f86c81bbcbb04e12aae78d04651622.tar.bz2 rails-006f710361f86c81bbcbb04e12aae78d04651622.zip |
Correct guide relating MiddlewareStackProxy with Enumerable
[ci skip] Enumerable.instance_methods &
Rails::Configuration::MiddlewareStackProxy.instance_methods # =>
[:as_json]
MiddlewareStackProxy does not share any notable methods with Enumerable.
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/rails_on_rack.md | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md index 7ef54a45bc..acab7a151c 100644 --- a/guides/source/rails_on_rack.md +++ b/guides/source/rails_on_rack.md @@ -182,18 +182,17 @@ You can swap an existing middleware in the middleware stack using `config.middle config.middleware.swap ActionDispatch::ShowExceptions, Lifo::ShowExceptions ``` -#### Middleware Stack is an Enumerable +#### Deleting a Middleware -The middleware stack behaves just like a normal `Enumerable`. You can use any `Enumerable` methods to manipulate or interrogate the stack. The middleware stack also implements some `Array` methods including `[]`, `unshift` and `delete`. Methods described in the section above are just convenience methods. - -Append following lines to your application configuration: +Add the following lines to your application configuration: ```ruby # config/application.rb config.middleware.delete "Rack::Lock" ``` -And now if you inspect the middleware stack, you'll find that `Rack::Lock` will not be part of it. +And now if you inspect the middleware stack, you'll find that `Rack::Lock` is +not a part of it. ```bash $ rake middleware |