small fix for embeded url
This commit is contained in:
parent
9fba36489e
commit
d48297e36f
|
@ -36,7 +36,7 @@ class AdImage
|
|||
|
||||
def embed_url
|
||||
uri = URI.parse(self.youtube) rescue nil
|
||||
if !uri.nil?
|
||||
if !uri.nil? && uri.host == "www.youtube.com"
|
||||
params = CGI.parse(uri.query)
|
||||
v = params['v'].first
|
||||
return "http://www.youtube.com/embed/#{v}"
|
||||
|
|
Loading…
Reference in New Issue