Sha256: cecb250e56d54874cd9f8556799ad8b87e6d28de131995886c076d7ec6b5106d
Contents?: true
Size: 308 Bytes
Versions: 83
Compression:
Stored size: 308 Bytes
Contents
module Wco::PremiumItem def self.included base base.send :field, :premium_tier, type: Integer, default: 0 # how many unlocks are need, to get access? 0 = free base.send :has_many, :premium_purchases, class_name: '::Ish::Payment', as: :item end def is_premium premium_tier > 0 end end
Version data entries
83 entries across 77 versions & 1 rubygems