2016-07-26 17:00:00 -05:00
|
|
|
class Quiz < ApplicationRecord
|
2016-07-28 20:54:08 -05:00
|
|
|
has_many :questions, -> { order(:sort) }
|
2016-07-27 11:17:50 -05:00
|
|
|
has_many :candidates
|
2016-08-18 15:35:17 -05:00
|
|
|
|
2016-08-18 18:22:57 -05:00
|
|
|
validates_presence_of :name
|
2016-08-18 15:35:17 -05:00
|
|
|
validates_presence_of :dept
|
|
|
|
validates_presence_of :unit
|
2016-07-26 17:00:00 -05:00
|
|
|
end
|