Sha256: 0dec46b6ad048ffdd15b01363db86e0a916083ad8b6a51044315df23852ca9d7

Contents?: true

Size: 349 Bytes

Versions: 1

Compression:

Stored size: 349 Bytes

Contents

module Ecom
  class Product
    include Mongoid::Document
    include Mongoid::Slug

    field :name, type: String
    field :description, type: String
    field :base_price, type: Float
    field :size, type: String
    slug :name, history: true

    belongs_to: category
    has_many :line_items
    mount_uploader :image, ImageUploader
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ecom-0.2.0 app/models/ecom/product.rb