Checkpoint 5 feedback
Closed this issue ยท 0 comments
jsm13 commented
Part 1 (Initial Setup)
- Run the command to generate a new Rails application called todo_app.
๐ - Create your database.
๐ - Define a Todo model and create a corresponding migration. It should have two attributes: content (string) and is_completed (boolean).
๐๐ - Generate your schema.
๐ - Create two Todo instances in your seed file. Run your seed file.
Be careful about types;is_completed
needs to be boolean and the seeds use string"No"
- Run your Rails server to see your application in the browser.
๐
Part 2 (Error Driven Development)
- Set up routes for index, show and new.
๐ using resources works here but make sure you know the syntax for declaring individual routes - Implement controller actions and views for the index, show and new features.
Make sure resource controllers have plural names (todos_controller.rb
rather thantodo_controller.rb
). Also make sure to keep in mind the differences betweennew
andcreate
actions. Thenew
action takes care of rendering the form for creating an entity (handles theGET /todos/new
route) rather than doing the actual creation (thePOST /todos
route)