aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/rails_on_rack.md
diff options
context:
space:
mode:
authorAlex Johnson <notalexjohnson@gmail.com>2013-11-13 13:23:09 +0530
committerAlex Johnson <notalexjohnson@gmail.com>2013-11-13 13:30:58 +0530
commit006f710361f86c81bbcbb04e12aae78d04651622 (patch)
treef3ffb07e74bd317027c6b17d7f8b68e60327790d /guides/source/rails_on_rack.md
parentb9a4560d91d382600164e69cf98d8eb6688447df (diff)
downloadrails-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/rails_on_rack.md')
-rw-r--r--guides/source/rails_on_rack.md9
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