admin controller tests, sans question
This commit is contained in:
1 parent
6a3f652dd7
commit
430097b6ef
21 files changed
+275
-55
No files matched your search
@@ -1,4 +1,7 @@
|
||||
class Quiz < ApplicationRecord
|
||||
has_many :questions, -> { order(:sort) }
|
||||
has_many :candidates
|
||||
|
||||
validates_presence_of :dept
|
||||
validates_presence_of :unit
|
||||
end
|
||||
@@ -1,4 +1,8 @@
|
||||
class User < ApplicationRecord
|
||||
has_secure_password
|
||||
has_many :candidates, foreign_key: "recruiter_id"
|
||||
|
||||
validates_presence_of :email
|
||||
validates_presence_of :name
|
||||
validates_presence_of :role
|
||||
end
|
||||
Reference in new issue
Block a user