skill-assessment-app/app/models/answer.rb
2016-09-07 17:45:50 -05:00

19 lines
385 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
# Throw away attributes
# convenience for form manipulation
def answer_array=(val); end
def answer_hash=(val); end
def answer_id=(val); end
end