All basic question types

This commit is contained in:
Charlotte Van Petegem 2025-04-27 00:13:20 +02:00
parent 3e1e5618ca
commit 4fe218166f
Signed by: chvp
SSH key fingerprint: SHA256:s9rb8jBVfdahqWHuBAcHCBP1wmj4eYQXZfqgz4H3E9E
51 changed files with 760 additions and 92 deletions

View file

@ -1,3 +1,25 @@
# == Schema Information
#
# Table name: answers
#
# id :integer not null, primary key
# data :text
# created_at :datetime not null
# updated_at :datetime not null
# question_id :integer not null
#
# Indexes
#
# index_answers_on_question_id (question_id)
#
# Foreign Keys
#
# question_id (question_id => questions.id)
#
class Answer < ApplicationRecord
belongs_to :question
has_one_attached :image
serialize :data, coder: JSON
end