Sha256: cd1d4f669e795a45efc6cedf245c14737429c1f958b247a2235c86291d3944e8

Contents?: true

Size: 537 Bytes

Versions: 4

Compression:

Stored size: 537 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/patients"

module Renalware
  module Patients
    class Worry < ApplicationRecord
      include Accountable

      has_paper_trail(
        versions: { class_name: "Renalware::Patients::Version" },
        on: [:create, :update, :destroy]
      )

      belongs_to :patient,
                 class_name: "Renalware::Patient",
                 foreign_key: :patient_id,
                 touch: true

      validates :patient, presence: true, uniqueness: true
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
renalware-core-2.0.153 app/models/renalware/patients/worry.rb
renalware-core-2.0.152 app/models/renalware/patients/worry.rb
renalware-core-2.0.151 app/models/renalware/patients/worry.rb
renalware-core-2.0.149 app/models/renalware/patients/worry.rb