lib/video.rb in ish_models-0.0.33.222 vs lib/video.rb in ish_models-0.0.33.224
- old
+ new
@@ -5,10 +5,11 @@
class Video
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Paperclip
include Mongoid::Paranoia
+ include Ish::PremiumItem
include Ish::Utils
include Mongoid::Votable
vote_point self, :up => +1, :down => -1
@@ -73,28 +74,10 @@
:s3_protocol => 'https',
:validate_media_type => false,
s3_region: ::S3_CREDENTIALS[:region]
validates_attachment_content_type :thumb, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif", 'application/octet-stream' ]
- ## copy-paste
- field :premium_tier, type: Integer, default: 0 # how many stars need to spend, to get access? 0 = free
- def is_premium
- premium_tier > 0
- end
- def premium?; is_premium; end
- has_many :premium_purchases, class_name: '::Gameui::PremiumPurchase', as: :item
-
def export_fields
%w| name descr |
end
-
-
end
-
-
-=begin
- field :issue
-
- field :is_feature, :type => Boolean, :default => false
- field :lang, :type => String, :default => 'en'
-=end