Sha256: 8b4467b8f5bc10699b17304656d388f1a465fe0a419d45214e9d258e4698e751
Contents?: true
Size: 578 Bytes
Versions: 18
Compression:
Stored size: 578 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/research" module Renalware module Research class StudyParticipant < ApplicationRecord include Accountable acts_as_paranoid validates :participant_id, presence: true, uniqueness: { scope: :study } validates :study, presence: true belongs_to :study, touch: true belongs_to :patient, class_name: "Renalware::Patient", foreign_key: :participant_id, touch: true def to_s patient&.to_s end end end end
Version data entries
18 entries across 18 versions & 1 rubygems