Sha256: 2b99e50149f9920ff987b1ab9202ae0679a770bb210d0860c1d08a5f3020b112
Contents?: true
Size: 707 Bytes
Versions: 28
Compression:
Stored size: 707 Bytes
Contents
require_dependency "renalware/transplants" module Renalware module Transplants class DonorStage < ApplicationRecord include Accountable include PatientScope belongs_to :patient, class_name: "Renalware::Patient", touch: true belongs_to :stage_position, class_name: "DonorStagePosition" belongs_to :stage_status, class_name: "DonorStageStatus" validates :patient, presence: true validates :stage_position, presence: true validates :stage_status, presence: true validates :started_on, presence: true scope :current, ->{ where(terminated_on: nil) } scope :ordered, ->{ order(terminated_on: :desc, started_on: :desc) } end end end
Version data entries
28 entries across 28 versions & 1 rubygems