12 lines
251 B
Ruby
12 lines
251 B
Ruby
class Question < ApplicationRecord
|
|
serialize :input_options, Array
|
|
|
|
has_many :answers
|
|
belongs_to :quiz
|
|
|
|
validates_presence_of :quiz_id
|
|
validates_presence_of :question
|
|
validates_presence_of :category
|
|
validates_presence_of :input_type
|
|
end
|