Forum: Ruby on Rails no referer defined in TestRequest

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Khaled H. (Guest)
on 2007-06-06 04:21
(Received via mailing list)
in my controller I do the following after login:

    redirect_to  request.referer) || '/'

which works well until I test it, then the dwarfs complain that there
is no referer defined. I did the following and it worked:

    redirect_to (defined?(request.referer) && request.referer) || '/'

It seems like there is no referer (nil or otherwise) defined for
TestRequest. the curious thing though is that I'm the only who seems
to have seem this problem. did everyone silently work around this...
This topic is locked and can not be replied to.