Sha256: ae8bcb8de86058afc7db2f71ef575d64530fe0560035b03aa8252280dfdb20d7

Contents?: true

Size: 382 Bytes

Versions: 39

Compression:

Stored size: 382 Bytes

Contents

module Ecom
  module Core
    class RequestedItem < ApplicationRecord
      belongs_to :equipment_request
      belongs_to :equipment
      belongs_to :country, optional: true

      validates :start_date, :end_date, :quantity, presence: true
      validates :quantity, numericality: { only_integer: true, greater_than: 0 }
      validates_with DateRangeValidator
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
ecom_core-1.2.31 app/models/ecom/core/requested_item.rb
ecom_core-1.2.30 app/models/ecom/core/requested_item.rb
ecom_core-1.2.29 app/models/ecom/core/requested_item.rb
ecom_core-1.2.28 app/models/ecom/core/requested_item.rb
ecom_core-1.2.27 app/models/ecom/core/requested_item.rb
ecom_core-1.2.26 app/models/ecom/core/requested_item.rb
ecom_core-1.2.25 app/models/ecom/core/requested_item.rb
ecom_core-1.2.24 app/models/ecom/core/requested_item.rb
ecom_core-1.2.23 app/models/ecom/core/requested_item.rb
ecom_core-1.2.22 app/models/ecom/core/requested_item.rb
ecom_core-1.2.21 app/models/ecom/core/requested_item.rb
ecom_core-1.2.20 app/models/ecom/core/requested_item.rb
ecom_core-1.2.19 app/models/ecom/core/requested_item.rb
ecom_core-1.2.18 app/models/ecom/core/requested_item.rb
ecom_core-1.2.17 app/models/ecom/core/requested_item.rb
ecom_core-1.2.16 app/models/ecom/core/requested_item.rb
ecom_core-1.2.15 app/models/ecom/core/requested_item.rb
ecom_core-1.2.14 app/models/ecom/core/requested_item.rb
ecom_core-1.2.13 app/models/ecom/core/requested_item.rb