Sha256: d9e7da84d0d1954c169a9ea58ac7ebea32d4109475ca18c5591b0c57b6aa8f62

Contents?: true

Size: 256 Bytes

Versions: 5

Compression:

Stored size: 256 Bytes

Contents

module Ecom
  module Model
    class ResourceType < ApplicationRecord
      validates :code, :name, :base_unit, :type, presence: true
      validates :code, uniqueness: { scope: :type }
      validates :name, uniqueness: { scope: :type }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ecom_model-2.0.4 app/models/ecom/model/resource_type.rb
ecom_model-2.0.3 app/models/ecom/model/resource_type.rb
ecom_model-2.0.2 app/models/ecom/model/resource_type.rb
ecom_model-2.0.1 app/models/ecom/model/resource_type.rb
ecom_model-2.0.0 app/models/ecom/model/resource_type.rb