We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2ced2f commit df40b30Copy full SHA for df40b30
1 file changed
app/models/registration.rb
@@ -28,6 +28,8 @@ class Registration < ApplicationRecord
28
29
validates :user, uniqueness: { scope: :exam_version }
30
31
+ # note: we are not sure whether the current reg will show up in the association,
32
+ # so this validation remains separate from the previous uniqueness check
33
validate :user_exam_uniqueness
34
def user_exam_uniqueness
35
other_reg_exists =
0 commit comments