Sha256: 85f38971ef6744a4bba3fd9c0aa1ad0fe97ade61911cacde2d7ba5d55d6bf138
Contents?: true
Size: 586 Bytes
Versions: 12
Compression:
Stored size: 586 Bytes
Contents
module Comee module Core class ClientAddress < ApplicationRecord SHIPPING_ADDRESS = "Shipping Address".freeze DELIVERY_ADDRESS = "Delivery Address".freeze INVOICING_ADDRESS = "Invoicing Address".freeze ADDRESS_TYPES = [SHIPPING_ADDRESS, DELIVERY_ADDRESS, INVOICING_ADDRESS].freeze belongs_to :client belongs_to :country, -> { where(lookup_type: :country) }, class_name: "Comee::Core::Lookup" validates :name, :address_line1, :address_type, presence: true validates :address_type, inclusion: {in: ADDRESS_TYPES} end end end
Version data entries
12 entries across 12 versions & 1 rubygems