instance method
swap
Ruby on Rails edge
Since v3.0.20Signature
swap(target, ...)
No documentation comment.
Parameters
-
targetreq -
...req -
blockblock
Source
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 118
def swap(target, ...)
index = assert_index(target, :before)
insert(index, ...)
middlewares.delete_at(index + 1)
end
Defined in actionpack/lib/action_dispatch/middleware/stack.rb line 118
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::MiddlewareStack