25 lines
499 B
Ruby
25 lines
499 B
Ruby
# == 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
|