Sha256: 499f6ed8cca3aeef08eb48b31f242e6ffad1b9502dd32f9b61a24a00d6d6e295

Contents?: true

Size: 182 Bytes

Versions: 67

Compression:

Stored size: 182 Bytes

Contents

class LineItem
  include Mongoid::Document
  embedded_in :purchase
  belongs_to :product, polymorphic: true
  validates :product, presence: true, uniqueness: { scope: :product }
end

Version data entries

67 entries across 62 versions & 3 rubygems

Version Path
mongoid-4.0.2 spec/app/models/line_item.rb
mongoid-4.0.1 spec/app/models/line_item.rb
mongoid-4.0.0 spec/app/models/line_item.rb
mongoid-4.0.0.rc2 spec/app/models/line_item.rb
mongoid-4.0.0.rc1 spec/app/models/line_item.rb
mongoid-4.0.0.beta2 spec/app/models/line_item.rb
mongoid-4.0.0.beta1 spec/app/models/line_item.rb