Sha256: 75b6d877adb172e26d2561f2027c27c578355ad4ae650390b12496c98804bd79
Contents?: true
Size: 446 Bytes
Versions: 8
Compression:
Stored size: 446 Bytes
Contents
module Ecom module Core class CrewContract < ApplicationRecord belongs_to :crew validates :contract_no, :from, :to, :place_of_work, :probation_period, :contract_type, presence: true validates :contract_no, uniqueness: true validate :validate_date_range def validate_date_range return unless from && to errors.add(:to, 'cannot be before from date.') if from >= to end end end end
Version data entries
8 entries across 8 versions & 1 rubygems