Skip to content

Instantly share code, notes, and snippets.

@gabeodess
Created May 18, 2015 21:25
Show Gist options
  • Save gabeodess/8d5d21abec60bbc3c361 to your computer and use it in GitHub Desktop.
Save gabeodess/8d5d21abec60bbc3c361 to your computer and use it in GitHub Desktop.
Form builder data structure.
Form
employer:belongs_to
name:string
review_required:boolean
signature_required:boolean
Question (has_many :question_answers; multiple choice; text; multiple answer)
text:text
type:string (MultipleAnswerQuestion, MultipleChoiceQuestion, OpenQuestion)
Answer
question:belongs_to
text:string
AnswerSet (belongs_to :form)
user:belongs_to
submitted_at:datetime
QuestionAnswer
question:belongs_to
answer_set:belongs_to
value:hstore
PositionForm
form:belongs_to
employee_position:belongs_to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment