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