From 006f710361f86c81bbcbb04e12aae78d04651622 Mon Sep 17 00:00:00 2001 From: Alex Johnson Date: Wed, 13 Nov 2013 13:23:09 +0530 Subject: 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. --- guides/source/rails_on_rack.md | 9 ++++----- 1 file 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 -- cgit v1.2.3