Sha256: 4fde8dca63a5f22b07dd925108f3b30570f86913ccfe848862277f52cfc3626e
Contents?: true
Size: 544 Bytes
Versions: 36
Compression:
Stored size: 544 Bytes
Contents
class Video < ActiveRecord::Base belongs_to :index attr_accessible :name, :description, :index_id, :remote_id, :remote_type validates_presence_of :name, :remote_id include ActsAsPrioritizable acts_as_prioritizable("index", "assets") def url case remote_type when "Youtube" then "http://www.youtube.com/v/" when "Facebook" then "http://www.facebook.com/v/" end + remote_id end def thumb case remote_type when "Youtube" then "http://img.youtube.com/vi/" + remote_id + "/1.jpg" end end end
Version data entries
36 entries across 36 versions & 1 rubygems