Sha256: 52009c86cdcc07f8a4a6b52f237779537ac89857fb90d9e0690e1ca24d16d0ef

Contents?: true

Size: 301 Bytes

Versions: 11

Compression:

Stored size: 301 Bytes

Contents

# frozen_string_literal: true

class ProductVariation < ActiveRecord::Base
  belongs_to :product

  enum stock_status: { in_stock: 1, low_stock: 2, out_of_stock: 3 }

  validates :title, presence: true

  validates :currency, presence: true
  validates :amount, presence: true, numericality: true
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pursuit-0.4.5 spec/internal/app/models/product_variation.rb
pursuit-0.4.3 spec/internal/app/models/product_variation.rb
pursuit-0.4.2 spec/internal/app/models/product_variation.rb
pursuit-0.4.1 spec/internal/app/models/product_variation.rb
pursuit-0.4.0 spec/internal/app/models/product_variation.rb
pursuit-0.3.2 spec/internal/app/models/product_variation.rb
pursuit-0.3.1 spec/internal/app/models/product_variation.rb
pursuit-0.3.0 spec/internal/app/models/product_variation.rb
pursuit-0.2.0 spec/internal/app/models/product_variation.rb
pursuit-0.1.1 spec/internal/app/models/product_variation.rb
pursuit-0.1.0 spec/internal/app/models/product_variation.rb