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
So I replaced all of my :back with request.env[“HTTP_REFERER”] in my
controller. Now I get another error
stack level too deep
What can I use that will work the same as :back but pass tests.
I tried request.env_table[“REQUEST_URI”] which passes the test but fails
my application because it does not work the same way as :back
Thanks you for your time.