module Logistics module Core class EslTransportTariff < ApplicationRecord belongs_to :route has_many :esl_transport_tariff_rates validates :route, :storage_point, presence: true validates_uniqueness_of :route, :scope => :storage_point def name "#{self.route.route_name } (#{self.storage_point})" end end end end