Sha256: 5b4234cb1b31f2fee16870798b0d37f0c47fac3b39f0a4522131ca58237aea08
Contents?: true
Size: 416 Bytes
Versions: 56
Compression:
Stored size: 416 Bytes
Contents
class Wco::Product include Mongoid::Document include Mongoid::Timestamps include Mongoid::Paranoia store_in collection: 'wco_products' field :name field :product_id # stripe has_many :prices, class_name: 'Wco::Price', inverse_of: :product has_many :subscriptions, as: :product def self.list [ [nil,nil] ] + self.all.order_by({ name: :asc }).map { |i| [i.name, i.id] } end end
Version data entries
56 entries across 56 versions & 1 rubygems