set ivar @res in redirect_to

I was getting "link appears to be broken" error upon doing the tests, this change fixed it.