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

Version Path
wco_models-3.1.0.109 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.108 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.107 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.106 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.105 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.104 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.103 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.102 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.101 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.100 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.99 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.98 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.97 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.96 app/models/wco/premium_item.rb-trash
wco_models-3.1.0.95 app/models/wco/premium_item.rb
wco_models-3.1.0.94 app/models/wco/premium_item.rb
wco_models-3.1.0.93 app/models/wco/premium_item.rb
wco_models-3.1.0.92 app/models/wco/premium_item.rb
wco_models-3.1.0.91 app/models/wco/premium_item.rb
wco_models-3.1.0.90 app/models/wco/premium_item.rb