Fork then clone this repository. Submissions will be made by pull request.
Commit once after completing each step.
- From the command line, create a new Rails application called
todo_app
that uses a PostgreSQL database. - From the command line, create your database then generate a
Todo
model.Todo
should have two attributes:content
(string) andis_completed
(boolean). - From the command line, run the appropriate
rails
command to generate your schema. - Create two
Todo
instances in your seed file, then run your seed file from the command line.
Start your Rails server to see your application in the browser. Commit once after completing each action or view.
- Set up routes and controller actions for
index
,new
, andcreate
. - Create views for the
index
andnew
actions. - Set the homepage or root route of your application to load the Todo index view.
- Bonus: Your controller uses strong params.
- Bonus: Set up routes and controller actions for
delete
,edit
, andupdate
. - Bonus: Create a view for
edit
where you can trigger anupdate
ordelete
.
Take a moment to re-familiarize yourself with the plagiarism policy, specifically on using work you find online and on work you do with other students.
Your score will be calculated on the following list of completed items (pulled from above). Each item is worth 1 point.
- Your PR contains a folder called
todo_app
with a rails app inside of it - Your app is using PostgreSQL
- You have a Todo model
- Your Todo model has
content
(string) andis_completed
(boolean) attributes - You have a valid schema
- We can successfully create a database by running
rails db:create
- You have a seed file with two Todo instances in it
- We can seed the database with your seed instances by running
rails db:seed
- If we run
rails routes
, we can see routes listed forindex
,new
, andcreate
- Your controller has
index
,new
, andcreate
actions - Your
index
action gets all to dos from the database and lists them in theindex
view - Your
new
action creates a new to do and renders anew
view with a form for creating a new to do - Your
create
action creates a new to do based on a form submission and saves it to the database - The homepage of your app lists all to dos
- Your git history shows that you committed your work once after each step and each commit has a descriptive message