I need the path of the referrer. I don't want the domain name. For example, if the referrer is http://www.google.com/adsense I want /adsense.
http://www.google.com/adsense
/adsense
request.referer returns a string, but you can use Ruby's URI Module to wrap it and then simply ask it for its path:
request.referer
if URI(request.referer).path == '/adsense'
1.4m articles
1.4m replys
5 comments
57.0k users