Skip to content
Browse files

modified: app/models/video.rb

  • Loading branch information...
1 parent e3f7576 commit 8c78a233a10b1eea64bfbe9e5cc579dcae89dd85 @jodyalbritton committed
Showing with 1 addition and 2 deletions.
  1. +1 −2 app/models/video.rb
View
3 app/models/video.rb
@@ -1,5 +1,4 @@
class Video < ActiveRecord::Base
- require 'open-uri'
attr_reader :thumbnail_remote_url
before_validation :update_details
after_create :thumbnail_remote_url
@@ -35,7 +34,7 @@ class Video < ActiveRecord::Base
def thumbnail_remote_url
thumb_url = 'http://img.youtube.com/vi/'+self.uid+'/hqdefault.jpg'
- self.thumbnail = open(thumb_url)
+ self.thumbnail = URI.parse(thumb_url)

0 comments on commit 8c78a23

Please sign in to comment.
Something went wrong with that request. Please try again.