module Logistics module Core class AdditionalDocument < ApplicationRecord belongs_to :document_type belongs_to :documentable, polymorphic: true belongs_to :transaction_type delegate(:name, to: :document_type, prefix: true) delegate(:name, to: :transaction_type, prefix: true) end end end