Permalink
Browse files

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.
  • Loading branch information...
1 parent b9a4560 commit 006f710361f86c81bbcbb04e12aae78d04651622 @notalex notalex committed Nov 13, 2013
Showing with 4 additions and 5 deletions.
  1. +4 −5 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

0 comments on commit 006f710

Please sign in to comment.