Stack Too Deep

I am using

redirect_to :back for my login form. It works perfectly.

However when I ran some tests I got errors.

No HTTP_REFERER was set in the request to this action,so redirect_to
:back could not be called successfully. If this is a test, make sure
to
specify request.env["HTTP_REFERER"]

I think what this means is that in the setup of your test you should
set what the referer is (ie @request.env["HTTP_REFERER"] = "http://something.example.com
" )

Fred

Frederick Cheung wrote: