Sha256: 2ee3cfddd67aedce182f3df3bc01d256e2b6cf6d2870729178fe8f643907c7c7
Contents?: true
Size: 633 Bytes
Versions: 56
Compression:
Stored size: 633 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/clinics" module Renalware module Clinics class Appointment < ApplicationRecord include Accountable belongs_to :patient, touch: true belongs_to :clinic belongs_to :consultant, class_name: "Renal::Consultant" validates :starts_at, presence: true validates :patient_id, presence: true validates :clinic_id, 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
56 entries across 56 versions & 1 rubygems