Add new code to the app

❮ Back Next ❯

Run this command to add a Person model class and simple pages for CRUDing Person records:

rails generate scaffold Person first_name last_name date_of_birth:date

Migrate the database:

rails db:migrate:reset

Run the server:

rails s

Open http://localhost:3000/people to confirm that the pages are working. For example, you might create a new person record.

Press Ctrl-C to halt the server.


❮ Back Next ❯