Sha256: 89b4eccda91c72bd4f3934d0eb9ab3369ec6a57f0350b7080286a71706ba4740
Contents?: true
Size: 607 Bytes
Versions: 64
Compression:
Stored size: 607 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_id, presence: true validates :clinic_id, 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
64 entries across 64 versions & 1 rubygems