Sha256: 2f92b211cce6dea9394334456e5bef41cca8550deb637ed7c83296444aa85036
Contents?: true
Size: 611 Bytes
Versions: 13
Compression:
Stored size: 611 Bytes
Contents
require_dependency "renalware/research" module Renalware module Research class Study < ApplicationRecord include Accountable acts_as_paranoid validates :code, presence: true, uniqueness: { scope: :deleted_at } 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) } has_many :participants, class_name: "StudyParticipant", dependent: :destroy end end end
Version data entries
13 entries across 13 versions & 1 rubygems