GithubHelp home page GithubHelp logo

conradbuys11 / cosmic_travel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paulnicholsen27/cosmic_travel

0.0 0.0 1.0 306 KB

Mod 2 Code Challenge Review

Ruby 74.28% JavaScript 7.26% CSS 3.64% HTML 14.82%

cosmic_travel's Introduction

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:

    • A user should be able to see a list of all scientists

    • Clicking on a scientist should take you to a detail page about the scientist, including listing all the planets they have visited.

    • A user should be able to create a new scientist.

      • Scientists must have a name and a field of study
      • Scientists' names should be unique
      • If the user makes a mistake on the form, an error should display to the user
    • A user should be able to edit the details of a scientist

    • A user should be able to delete a scientist

    • A user should be able to create a new mission by choosing a scientist and a planet from dropdown menus.

      • A mission must have a unique name, a scientist, and a planet.
      • After the mission is created, the user should be redirect to the scientist's detail page
      • Check that this is working correctly by verifying the new planet appears on the scientist's detail page
  • Build an "about" page at "/about" which should list your name and the total number of scientists and planets in your database.

cosmic_travel's People

Contributors

dependabot[bot] avatar paulnicholsen27 avatar

Forkers

pandabearcoding

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.