Replace deprecated response.redirected_to with response.redirect_url