Sha256: ca30fd617d125bb9750cf1e93b6ed98912997961be18a8b49e0fe75dfb61b957
Contents?: true
Size: 870 Bytes
Versions: 13
Compression:
Stored size: 870 Bytes
Contents
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 belongs_to :patient, class_name: "Renalware::Patient", foreign_key: :participant_id def to_s patient&.to_s end end end end # include Accountable # acts_as_paranoid # validates :code, presence: true # validates :description, presence: true # validates :started_on, timeliness: { type: :date, allow_blank: true } # validates :terminated_on, timeliness: { type: :date, allow_blank: true, after: :started_on } # scope :ordered, -> { order(created_at: :asc) } # end # end # end
Version data entries
13 entries across 13 versions & 1 rubygems