Sha256: c8fae3766f66cf07bdddb222086848a591946f5af444ad064af3bc3033e1ba6a
Contents?: true
Size: 822 Bytes
Versions: 88
Compression:
Stored size: 822 Bytes
Contents
class CoTailors::OrderItem include Mongoid::Document include Mongoid::Timestamps belongs_to :order, :class_name => 'CoTailors::Order' KIND_SHIRT = 'const-kind-shirt' KIND_PANTS = 'const-kind-pants' KIND_SUIT = 'const-kind-suits' KINDS = %w{ const-kind-shirt const-kind-pants const-kind-suits } field :kind, :type => String validates :kind, :presence => true FABRICS = [ :white, :black, :light_blue, :dark_blue, :dark_green, :pink, :gray ] field :fabric, :type => String validates :fabric, :presence => true has_one :measurement, :class_name => 'CoTailors::ProfileMeasurement' validates :measurement, :presence => true field :quantity, :type => Integer validates :quantity, :presence => true field :cost, :type => Integer # pennies! validates :cost, :presence => true end
Version data entries
88 entries across 88 versions & 1 rubygems