Sha256: c3709a0856b3a62702157c969308cc3f345ad13c3ff4d05ffbcf9572aa018e7e
Contents?: true
Size: 347 Bytes
Versions: 36
Compression:
Stored size: 347 Bytes
Contents
module Comee module Core class TimeSlot < ApplicationRecord belongs_to :transport_availability validates :from, :to, presence: true validate :validate_time_range def validate_time_range return unless from && to errors.add(:base, "From must be before to.") if from >= to end end end end
Version data entries
36 entries across 36 versions & 1 rubygems