Sha256: fdb35774e3f8c4ebf8ffe1cedb838c705910ad28efa68b2876d76b527d8a2e11

Contents?: true

Size: 319 Bytes

Versions: 9

Compression:

Stored size: 319 Bytes

Contents

module Logistics
  module Core
    class Unit < ApplicationRecord
      validates :name, :abbreviation, presence: true, uniqueness: true
      validates :unit_type, presence: true
      belongs_to :unit_type, class_name: 'Logistics::Core::UnitType'

      delegate(:name, to: :unit_type, prefix: true)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
logistics_core-21.11.2 app/models/logistics/core/unit.rb
logistics_core-21.11.1 app/models/logistics/core/unit.rb
logistics_core-21.08.1 app/models/logistics/core/unit.rb
logistics_core-21.03.1 app/models/logistics/core/unit.rb
logistics_core-20.10.3 app/models/logistics/core/unit.rb
logistics_core-20.10.2 app/models/logistics/core/unit.rb
logistics_core-20.10.1 app/models/logistics/core/unit.rb
logistics_core-20.9.1 app/models/logistics/core/unit.rb
logistics_core-20.8.1 app/models/logistics/core/unit.rb