Redirection
Often, we need to redirect to a new url in the middle of a request. A successful create
action, for instance, will usually redirect to the show
action for the model we just created. Alternately, it could redirect to the index
action to show all the things of that same type. There are plenty of other cases where redirection is useful as well.
Calling redirect_to will halt the request lifecycle.
Redirect to URL
Redirect to Action
Redirect to Controller Action
Redirect Back
Last updated