skill-assessment-app/app/models/answer.rb
2016-08-01 09:50:01 -05:00

11 lines
230 B
Ruby

class Answer < ApplicationRecord
serialize :answer
belongs_to :question
belongs_to :candidate
validates :candidate_id, presence: true
validates :question_id, presence: true
validates :answer, answer_format: true
end