homeland-site 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/site.rb +3 -1
- data/lib/homeland/site/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 159bbd88daba311bad975142cd69345e51fa16ed603d9e0cb5d60b9c2da43037
|
4
|
+
data.tar.gz: 819ce44a7c94a86332b4bfb507755d2a15cda532176f041a270c6bf314a18e4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2d5bb794b99f1916bc77bf4eee0e5f050f69f943d8ac993ecf17476f3aa974fe815ac100f96be2cc75fc47af1d9a79fff328b878c131f6caf1af309b917582c
|
7
|
+
data.tar.gz: a5e01cd7cf5912be1636e58488a81ea62f546ea3476c443141040dee7ba924a2789f78e1c7316f8feb925a54c0774951c9954caf2a7689ed313c999e340426d7
|
data/app/models/site.rb
CHANGED
@@ -18,7 +18,9 @@ class Site < ApplicationRecord
|
|
18
18
|
|
19
19
|
def favicon_url
|
20
20
|
return "" if url.blank?
|
21
|
-
domain = URI.parse(url).host.sub("www.", "")
|
21
|
+
domain = URI.parse(url.strip).host.sub("www.", "")
|
22
22
|
"https://favicon.ruby-china.com/ip2/#{domain}.ico"
|
23
|
+
rescue
|
24
|
+
""
|
23
25
|
end
|
24
26
|
end
|