HTTP 302 and redirect_to

redirect_to does indeed send a 302 response to the browser, which causes the browser to make a new request at the redirect URL. A whole new web request occurs, and none of the code executed before the redirect is retained in memory.