our referer is bust if there is no domain
This commit is contained in:
parent
64c89316a6
commit
f3ac84d41f
|
@ -40,7 +40,8 @@ class IncomingLink < ActiveRecord::Base
|
||||||
# Internal: Extract the domain from link.
|
# Internal: Extract the domain from link.
|
||||||
def extract_domain
|
def extract_domain
|
||||||
if referer.present?
|
if referer.present?
|
||||||
self.domain = URI.parse(referer).host
|
self.domain = URI.parse(self.referer).host
|
||||||
|
self.referer = nil unless self.domain
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue