back to

Ruby on Rails To-do List

ARCHIVED

Archived: This project has been archived. Cards can no longer be completed.

Generate a scaffold

Stefy
Stefy completed this card.
Last updated
  • A scaffold creates a model
  • It also sets the to-do list controller; which talks to the models and asks for different pieces of information which it then presents to the view 
  • Generate the scaffold which then creates a migration that tells the database what to do:

  • bin/rails generate scaffold todo_list title:string description:text

  • bin rake:db migrate

  • Make sure to add: 

bin/rake db:migrate RAILS_ENV=test

which maintains a separate copy of the development and test database.

  • Change the routes.rb file to make the todo_list the home page: root 'todo_lists#index'

What do I have so far?