Sha256: 88820e940f7de818a0c75f8264329a78c193fb95a2f3830e57775da739f9c3a4
Contents?: true
Size: 1.05 KB
Versions: 28
Compression:
Stored size: 1.05 KB
Contents
require_dependency "renalware/pd" require "document/base" module Renalware module PD class TrainingSession < ApplicationRecord include Accountable include PatientScope include OrderedScope include Document::Base extend Enumerize belongs_to :patient, class_name: "Renalware::PD::Patient", touch: true belongs_to :training_site, class_name: "Renalware::PD::TrainingSite" belongs_to :training_type, class_name: "Renalware::PD::TrainingType" attr_reader :ignore_me # see html form for explanation of this non-persistent attribute validates :training_site_id, presence: true validates :training_type_id, presence: true class Document < Document::Embedded attribute :started_on, Date attribute :trainer, String attribute :training_duration, String attribute :outcome, ::Document::Enum, enums: %i(successful limited_success unsuccessful) attribute :training_comments validates :started_on, presence: true end has_document end end end
Version data entries
28 entries across 28 versions & 1 rubygems