Sha256: 0ac1222def83a10289c1b8e32efd6bfb56b3b74f4480282341d15932894d9751
Contents?: true
Size: 601 Bytes
Versions: 29
Compression:
Stored size: 601 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/clinics" module Renalware module Clinics class Appointment < ApplicationRecord belongs_to :patient, touch: true belongs_to :clinic belongs_to :user validates :starts_at, presence: true validates :patient, presence: true validates :clinic, presence: true validates :user, presence: true validates :starts_at, timeliness: { type: :datetime } def starts_on starts_at.to_date end def start_time starts_at.strftime("%H:%M") end end end end
Version data entries
29 entries across 29 versions & 1 rubygems