layout: page title: Rails Practice
Exercises
Phase 1
- Community Garden: Many-to-Many Setup Practice Repo
- Hotel It On a Mountain: Many-to-Many Setup Practice Repo
Phase 2
- SQL/AR Practice with Student Enrollments Repo
- Coming Soon: AR/SQL Obstacle Course
Phase 3
Using this API starter repo, complete these exercises:
- Seattle Grace: Hospitals have many doctors. Doctors belong to just one hospital. Patients can have many doctors. Doctors can have many patients.
- Create an endpoint to see a list of all a doctor’s patients
- Create an endpoint to remove a patient from a doctor’s list of patients
- Create an endpoint to retrieve a list of all patients over 65 years old that see a doctor at a given hospital
- Bon Voyage: Airlines need a new way to track customers! Based on the endpoints below, you need to decide what models and relationships are needed
- Create an endpoint that allows an airline to see all of its flights that are delayed
- Create an endpoint that allows a customer to reserve a seat on a flight, and indicate if they want to pay up front or upon arriving (old school!)
- Create an ednpoint that allows a customer to see all flights they have booked in the last year.