Sha256: c56cd4de3e8fd2fb0b8a360fa85c411abd572f3fd67917bacf9dd14f8c80e932

Contents?: true

Size: 308 Bytes

Versions: 9

Compression:

Stored size: 308 Bytes

Contents

module Logistics
  module Core
    class Declarant < ApplicationRecord
      validates :first_name, :last_name, :number, presence: true
      validates :first_name, :uniqueness => { scope: [:last_name, :number] }

      def full_name
        "#{self.first_name} #{self.last_name}"
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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