Lesson 21. Capstone: Adding CRUD Models to Confetti Cuisine

 

Confetti Cuisine is satisfied with the progress I made connecting their application to a database and setting it up to process subscriber information. They’ve sent me a list of cooking courses that they’d like to begin to advertise on their site. Essentially, they want subscribers to pick the courses they’re most interested in attending. Then, if a subscriber later creates a user account, the business wants those two accounts to be linked.

To accomplish this task, I need to improve the Subscriber model and build the User and Course models. I need to keep the relationships between these models in mind and populate data from associated models when necessary. Last, I need to generate all the functionality needed to allow the creation, reading, updating, and deletion (CRUD) of model records. In this capstone, I’m going to create a user login form that allows a user to create an account and then edit, update, and delete the account. I’ll repeat most of the process for courses and subscribers to Confetti Cuisine’s newsletter.

When I’m done, I’ll have an application to show the team at Confetti Cuisine that allows them to sign up new users and monitor their courses before officially launching the program.

For this purpose, I need the following:

  • Schemas for the user, subscriber, and course models
  • CRUD actions for all models in the application
  • Views showing links between models

21.1. Getting set up

21.2. Building the models

21.3. Creating the views

21.4. Structuring routes

21.5. Creating controllers

Summary