Skip to content

Instantly share code, notes, and snippets.

@khannotations
Created January 27, 2017 08:49
Show Gist options
  • Select an option

  • Save khannotations/29e23f8487b6a68c653bd3adaca03131 to your computer and use it in GitHub Desktop.

Select an option

Save khannotations/29e23f8487b6a68c653bd3adaca03131 to your computer and use it in GitHub Desktop.
vr = Program.create!({
name: "Virtual Reality Course",
description: "Design and build your own world. Learn the foundations of 3D modeling, scene building, animation, and coding in VR. Topics include Unity, object-oriented programming, 3D scene composition, 3D interactions, the Unity Asset Store, and more. ",
program_type: :course,
status: :active,
})
period = Period.current.order(:start_date).second
Session.create!({
program: vr,
period: period,
status: Session.statuses[:open],
capacity: 15
})
webdev = Program.find_by(name: "Front-end Web Dev Course")
questions = webdev.questions.first(8) # Copy all but last question from web dev.
vr.questions << questions
vr.questions << Question.create!({
text: "Tell us what you think are the possibilities of virtual reality, and what you'd like to build with it.",
question_type: :interview,
priority: 4000
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment