ChippyChoppy / cosmic_travel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Task

It is the year 2100 and you run an interplanetary space travel agency. You are building a website to book scientists on missions to other planets. You already have built out your planetary database to perform all CRUD actions on the planets you travel to. It is your job to build out Scientist and Mission models so that scientists can book their missions. In a given mission, one scientist will visit one planet. Over their careers, scientists will visit many planets and planets will be visited by many scientists.

Instructions

  • Sketch out the domain of the models of Planet, Scientist and Mission. Think about what foreign keys should go on which models. What are the relationships between the three?

  • Once you are confident in your domain sketch, build out the models and migrations for your database.

    • Your Scientist model should have a name (string) and field_of_study (string).
    • Your Mission model should have a name (string).
    • You will also need to include foreign keys on the appropiate models.
  • Test your models are set up correctly by running rails db:seed (hint: make sure you set up the relationships on your models!)

  • Build the following features on your website:

About


Languages

Language:Ruby 74.4%Language:HTML 16.7%Language:JavaScript 7.1%Language:CSS 1.3%Language:SCSS 0.4%