summary roughed in

This commit is contained in:
Mark Moser
2016-07-28 20:54:08 -05:00
parent f9930ce531
commit 3a1c7de698
10 changed files with 102 additions and 61 deletions

View File

@ -1,6 +1,6 @@
class Candidate < ApplicationRecord
belongs_to :quiz
has_many :questions, through: :quiz
has_many :questions, -> { order("sort") }, through: :quiz
has_many :answers
belongs_to :recruiter, class_name: "User"

View File

@ -1,4 +1,4 @@
class Quiz < ApplicationRecord
has_many :questions
has_many :questions, -> { order(:sort) }
has_many :candidates
end