Git Product home page Git Product logo

phase-4-rails-practice-challenge-students's Introduction

Rails Practice Challenge - Students

Setup

To download the dependencies for backend, run:

$ bundle install

There is some starter code in the db/seeds.rb file so that once you've generated the models, you'll be able to create data to test your application.

You can run your Rails API on localhost:3000 by running:

$ rails s

There are no tests for this application, so you'll need to check your progress by running the server and using Postman make requests.

Introduction

We're going to build an API for an instructor to manage their students. Create the following database structure. You will have two models (and their corresponding tables), Student and Instructor, with the following relationships:

  • An instructor has many students
  • A student belongs to an instructor

The models should have the following attributes (along with any attributes needed to create the relationships defined above):

  • Instructor
    • name (must be present)
  • Student
    • name (must be present)
    • major
    • age (must be >= 18)

Make sure to define validations for your models so that no bad data can be saved to the database.

Deliverables

As a user, I can:

  • Create, read, update and delete Instructors
  • Create, read, update and delete Students
    • When creating or updating a student, they must be associated with an instructor

Follow good API design practices and use RESTful routing conventions. Make sure to handle errors and invalid data by returning the appropriate status code along with a message.

Instructions

  • Time yourself while working on the deliverables
  • Commit when you hit 75 minutes
  • When you have finished all deliverables, commit again.

phase-4-rails-practice-challenge-students's People

Contributors

vidhisharma3193 avatar ihollander avatar

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.