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-7.0.13 spec/app/models/line_item.rb
mongoid-7.0.12 spec/app/models/line_item.rb
mongoid-6.4.8 spec/app/models/line_item.rb
mongoid-7.0.11 spec/app/models/line_item.rb
mongoid-7.0.10 spec/app/models/line_item.rb
mongoid-6.4.7 spec/app/models/line_item.rb
mongoid-6.4.5 spec/app/models/line_item.rb
mongoid-7.0.8 spec/app/models/line_item.rb
mongoid-7.0.7 spec/app/models/line_item.rb
mongoid-7.0.6 spec/app/models/line_item.rb
mongoid-5.4.1 spec/app/models/line_item.rb
mongoid-7.0.5 spec/app/models/line_item.rb
mongoid-7.0.4 spec/app/models/line_item.rb
mongoid-6.4.4 spec/app/models/line_item.rb
mongoid-7.0.3 spec/app/models/line_item.rb
mongoid-6.4.2 spec/app/models/line_item.rb
mongoid-7.0.2 spec/app/models/line_item.rb
mongoid-7.0.1 spec/app/models/line_item.rb
mongoid-6.4.1 spec/app/models/line_item.rb
mongoid-5.4.0 spec/app/models/line_item.rb