In this activity, you will learn how to create associations between your model classes and to use those associations to encode and navigate relationships between model objects in your web apps.
In the terminal, perform the following steps.
If you don’t already have a workspace
folder, create one with this command:
mkdir ~/workspace
Change directory (cd
) into your workspace
folder:
cd ~/workspace
Clone the practice-app repo into a model-association-activity
folder:
git clone git@github.com:memphis-cs/practice-apps-2023-08fall.git model-association-activity
cd
into the model-association-activity
folder:
cd model-association-activity
Note that by default, we are on the main
branch, which happens to be the branch we want to be on.
Install the Ruby gems (code libraries) required by the practice app:
bundle install
Reset the database so the practice app’s database is properly configured:
rails db:migrate:reset
Open the practice-app project in VS Code:
code ./