request.referre或request.env ['HTTP_REFERER']给我当前的网址,但我想获取我的活动发布的Facebook / linkedin网址。请帮帮我,我是rails的新手
if @request=request.env['HTTP_REFERER']
# request.env['HTTP_REFERER'].include?('facebook')
ExternalRefer.create(:name =>request.env['HTTP_REFERER'], :ip => client_ip.to_s )
end