Open
Conversation
Task ListMajor Learning Goals/Code Review
Functional Requirements/Manual Testing
Overall Feedback
Code Style Bonus AwardsWas the code particularly impressive in code style for any of these reasons (or more...?)
|
beccaelenzil
left a comment
There was a problem hiding this comment.
Great work on this project! It's clear that the learning goals for your first rails project were met. Keep up the hard work.
| patch '/tasks/:id', to: 'tasks#update' | ||
| delete '/tasks/:id', to: 'tasks#destroy' | ||
|
|
||
| patch '/tasks/:id/mark_done', to: 'tasks#mark_done', as: 'mark_done' |
There was a problem hiding this comment.
Consider how making two separate methods, for instance mark_complete and mark_incomplete would make this action idempotent.
| id = Task.last.id | ||
| expect { | ||
| delete task_path(id) | ||
| }.must_change "Task.count" |
There was a problem hiding this comment.
Consider an even more precise test.
Suggested change
| }.must_change "Task.count" | |
| expect { | |
| delete task_path(id) | |
| }.will_differ "Task.count", -1 |
| expect { | ||
| delete task_path(id) | ||
| }.must_change "Task.count" | ||
|
|
|
|
||
| it "can update an existing task" do | ||
| # Your code here | ||
| Task.create(name: "Get Shit Done", description: "You gotta werk.") |
There was a problem hiding this comment.
Good work fleshing out this test.
| @@ -0,0 +1,14 @@ | |||
| <%= form_with model: @task, class: 'create-form' do |f| %> | |||
| @@ -0,0 +1,3 @@ | |||
| <h2>Add a Task</h2> | |||
There was a problem hiding this comment.
Consider adding this to the partial by adding to the locals hash.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task List
Congratulations! You're submitting your assignment!
Comprehension Questions