9 lines
192 B
Ruby
9 lines
192 B
Ruby
class Quiz < ApplicationRecord
|
|
has_many :questions, -> { order(:sort) }
|
|
has_many :candidates
|
|
|
|
validates_presence_of :name
|
|
validates_presence_of :dept
|
|
validates_presence_of :unit
|
|
end
|