Conversation
…ell, tests added for all new actions
…ethod for displaying completed_at dates
… button display. refactored html to include this
beccaelenzil
left a comment
There was a problem hiding this comment.
Task List
Major Learning Goals/Code Review
| Criteria | yes/no, and optionally any details/lines of code to reference |
|---|---|
| At least 6 commits with meaningful commit messages | ✔️ Nice and descriptive! |
| Routes follow RESTful conventions | ✔️ Nice use of nesting routes for toggle_complete |
Uses named routes (like _path) |
✔️ |
| Creates Models and migrations | ✔️ |
| Creates styled views | ✔️ |
| Handles errors like nonexistant tasks | ✔️ |
Uses form_with to render forms in Rails |
✔️ |
Functional Requirements/Manual Testing
| Functional Requirement | yes/no |
|---|---|
| Successfully handles index & show | ✔️ |
| index & show tests pass | ✔️ |
| Successfully handles: New, Create | ✔️ |
| New, Create tests pass | ✔️ |
| Successfully handles: Edit, Update | ✔️ |
| Edit, Update tests pass with valid & invalid task ids | ✔️ |
| Successfully handles: Destroy, Task Complete | ✔️ |
| Tests for Destroy & Task Complete include tests for valid and invalid task ids | ✔️ |
Overall Feedback
Great work on this project! You've gone above and beyond to research new techniques (nested routes) and create helper method to create a well written program with impeccable user experience. It is clear that the learning goals for this project were met. Keep up the hard work!
To answer the question about the relational database vs. the model (I realize this may have already been answered this past week), the database is where the data is actually stored whereas the model is the blueprint and the functionality for that database. I'd be happy to discuss more in our 1:1 this week.
| Overall Feedback | Criteria | yes/no |
|---|---|---|
| Green (Meets/Exceeds Standards) | 5+ in Code Review && 6+ in Functional Requirements | ✔️ |
| Yellow (Approaches Standards) | 3+ in Code Review && 5+ in Functional Requirements, or the instructor judges that this project needs special attention | |
| Red (Not at Standard) | 0-2 in Code Review or 0-4 in Functional Reqs, or assignment is breaking/doesn’t run with less than 5 minutes of debugging, or the instructor judges that this project needs special attention |
Code Style Bonus Awards
Was the code particularly impressive in code style for any of these reasons (or more...?)
| Quality | Yes? |
|---|---|
| Perfect Indentation | ✅ |
| Elegant/Clever | ✅ |
| Descriptive/Readable | ✅ |
| Concise | ✅ |
| Logical/Organized | ✅ |
| @@ -0,0 +1,19 @@ | |||
| <main> | |||
|
|
||
| private | ||
|
|
||
| def action_success_check(action, redirect_path) |
There was a problem hiding this comment.
Wow, nice use of a custom method! You may be interested in reading about controllor filters.
|
|
||
| redirect_to tasks_path and return if task.nil? | ||
|
|
||
| if task.completed_at |
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.
| def display_task_completed_at(completed_at) | ||
| return completed_at ? "Completed: #{completed_at.to_formatted_s(:twelvehr_long_ordinal)}" : "In Progress" | ||
| end | ||
|
|
||
| def complete_button_text(completed_at) | ||
| return completed_at ? "Mark In-Progress" : "Mark Complete" | ||
| end |
There was a problem hiding this comment.
Nice us of the ternary operator and helper methods to make for great user experience.
Task List
Congratulations! You're submitting your assignment!
Comprehension Questions