This morning, you will have the option of choosing a review session or a pratice exercise.
The review session will go over basic CRUD for a single model rails app. The practice exercise will ask you to build out a two-model CRUD app with bonuses.
If you feel uneasy about the following bullets, please stick around for the review. Otherwise, please work on the exercise linked in the schedule with a partner.
- This checkpoint
- This checkpoint's part 4
- getting started with rails homework
- rails lessons up until this point
- Fork and clone this repository
cd db && ./setup.sh
- seed the database
Create a view for the cars index page. Loop through each of the cars and display each of their attributes.
Give your view some surrounding HTML, like a opening and closing head
and body
tags.
Nothing crazy - create a very simple stylesheet and link to it from layout.erb
Add a form to your index view that allows users to create a new car.
This form should make a post
request to cars
Define a post
route in app.rb
that will create the new car.
Redirect the user back to the cars index route.
Show us what you've got! This part will not be counted, but try implementing edit and delete.