request.referer returns a string, but you can use Ruby’s URI Module to wrap it and then simply ask it for its path:
if URI(request.referer).path == '/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:
if URI(request.referer).path == '/adsense'