custom error validations

This commit is contained in:
Mark Moser committed 2016-08-01 09:50:01 -05:00
1 parent dfd582d251
commit 95eec915c4
11 files changed
+79 -24

No files matched your search

+4
View File
@@ -3,4 +3,8 @@ class Answer < ApplicationRecord
belongs_to :question
belongs_to :candidate
validates :candidate_id, presence: true
validates :question_id, presence: true
validates :answer, answer_format: true
end