Sha256: 531ea65875417da32fb9d88cb9cc05a2352ae28cc90bbee08c3bee624c5420e6
Contents?: true
Size: 479 Bytes
Versions: 9
Compression:
Stored size: 479 Bytes
Contents
module Logistics module Core class Agency < ApplicationRecord validates :code, :name, presence: true, allow_blank: false validates :code, :uniqueness => { :scope => [:name, :agency_category_id] } validates :name, :uniqueness => { :scope => [:code, :agency_category_id] } validates :telephone, :contact_telephone, length: { maximum: 13 } belongs_to :agency_category delegate(:name, to: :agency_category, prefix: true) end end end
Version data entries
9 entries across 9 versions & 1 rubygems