Method: ActionDispatch::MiddlewareStack#delete
- Defined in:
- lib/action_dispatch/middleware/stack.rb
#delete(target) ⇒ Object
Deletes a middleware from the middleware stack.
Returns the array of middlewares not including the deleted item, or returns nil if the target is not found.
131 132 133 |
# File 'lib/action_dispatch/middleware/stack.rb', line 131 def delete(target) middlewares.reject! { |m| m.name == target.name } end |