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