Sha256: 5b3d2595ec63d9106dab3a4fbeac1828a0a3cf778a56919c3b49040b585704f4
Contents?: true
Size: 350 Bytes
Versions: 6
Compression:
Stored size: 350 Bytes
Contents
class Wco::Product include Mongoid::Document include Mongoid::Timestamps 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
6 entries across 6 versions & 1 rubygems