2016-07-26 17:00:00 -05:00
|
|
|
class Answer < ApplicationRecord
|
|
|
|
serialize :answer
|
|
|
|
|
|
|
|
belongs_to :question
|
|
|
|
belongs_to :candidate
|
2016-08-01 09:50:01 -05:00
|
|
|
|
|
|
|
validates :candidate_id, presence: true
|
|
|
|
validates :question_id, presence: true
|
|
|
|
validates :answer, answer_format: true
|
2016-07-26 17:00:00 -05:00
|
|
|
end
|