Sha256: 31cebbb12588b676882950fe23327bc2682903492454bd14e4a43418503fa9d3
Contents?: true
Size: 530 Bytes
Versions: 34
Compression:
Stored size: 530 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/surveys" module Renalware module Surveys class Question < ApplicationRecord include PatientScope acts_as_paranoid belongs_to :survey has_many( :responses, class_name: "Response", dependent: :nullify, foreign_key: :question_id ) validates :code, presence: true, uniqueness: { scope: :survey_id } validates :label, presence: true validates :position, presence: true end end end
Version data entries
34 entries across 34 versions & 1 rubygems