Conversation
…pdated the controller's index action to show all Task objects from the database.
…nality on task list. Added form for new task. All wave two tests passing.
beccaelenzil
left a comment
There was a problem hiding this comment.
You're off to a great start! Your controller actions show and understanding of params, redirect_to, and error handling, to name a few concepts covered to this point. You've written a custom couple routes for mark_complete and mark_incomplete that demonstrate your understanding of parameterized routes. On your next project you'll have an opportunity to practice strong_params and partial views. As time allows, I would recommend fleshing out the destroy, mark_complete, and mark_incomplete. Please reach out if you have any questions. Keep up the hard work.
| description: params[:task][:description], | ||
| completed_at: params[:task][:completed_at] | ||
| ) | ||
| if @task.save |
There was a problem hiding this comment.
While redirect_to can take different arguments, it is best to be consistent. The convention we will follow at ada is to redirect to a named path. For instance redirect_to task_path(@task.id).
| patch '/tasks/:id', to: 'tasks#update' #makes a change to a task | ||
| delete '/tasks/:id', to: 'tasks#destroy' #deletes a task | ||
|
|
||
| patch '/tasks/:id/mark_complete', to:'tasks#mark_complete' #Marks a task complete |
There was a problem hiding this comment.
Good work writing these custom routes. You are in a good position to flesh out the mark_complete and mark_incomplete controller actions.
| @@ -0,0 +1,30 @@ | |||
| <!DOCTYPE html> | |||
There was a problem hiding this comment.
I see you've used application/index.html.erb as your landing page. This is a nice convention. Consider also moving some of this code to the layout in views/layouts/application.html.erb so that it shows up on all pages. As it stands, there is no easy way to link from a task show page to the main task list.
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...?)
|
Task List
Congratulations! You're submitting your assignment!
Comprehension Questions