mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
* Survey period constraints * Add abilities * Enforce required questions * Update survey_submssion updated_at * Do a full match of possible answer and user reply
10 lines
265 B
Ruby
10 lines
265 B
Ruby
# frozen_string_literal: true
|
|
|
|
class SurveyReply < ActiveRecord::Base
|
|
belongs_to :user
|
|
belongs_to :survey_question
|
|
serialize :text
|
|
|
|
validates :user_id, :survey_question_id, presence: true
|
|
validates :survey_question_id, uniqueness: { scope: :user_id }
|
|
end
|