Just wondering if and how I can access the referer from the controller.
Thanks in advance
Give this a try:
$HTTP[“referer”]
That should work,
Chris
or in your controller you could use
request_uri – may need to use @request.request_uri
and a whold lot of others
http://api.rubyonrails.org/classes/ActionController/AbstractRequest.html#M000153
How would I redirect to the referer?
Alexander wrote:
How would I redirect to the referer?
Sorry,
redirect_to :back
Works now. Thanks