Conversation
Task ListWhat We're Looking For
Great work on this project, Amy! This project looks great; it meets the requirements on using Rails best practices, RESTful routing, and CRUD operations. One place that this could improve would be refactoring things such that the form is pulled into a partial views. I also have a few comments on the code. There is actually an interesting bug in your project. To recreate:
I have a comment that shows why this bug happens Otherwise, well done! Good work |
| @@ -0,0 +1,86 @@ | |||
| class TasksController < ApplicationController | |||
There was a problem hiding this comment.
This controller is named correctly, but weirdly enough, I'd expect your file name to be tasks_controller.rb, not capitalized like how it currently is (Tasks_controller)
| description: params["task"]["description"], | ||
| complete: params["task"]["complete"], | ||
| complete_date: params["task"]["complete_date"], | ||
| ) |
There was a problem hiding this comment.
I'd probably refactor this to use the strong params, so Task.new(task_params) here instead of this hash
| COMPLETION DATE: <%= task.complete_date %> | ||
| <br> | ||
| <%= link_to "View Task", task_path(task.id) %> | ||
| <% if task.complete == false %> |
There was a problem hiding this comment.
Here, you are checking specifically if task.complete is equal to false. However, the default value for task.complete for a new task ends up being nil. Therefore, this conditional ends up incorrectly displaying
Task List
Congratulations! You're submitting your assignment!
Comprehension Questions