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...?)
| Logical/Organized | ✅ SummaryWell done, you demonstrated a mastery of the actions we modeled in the ada books repository. Nice work. Do think for the next project how to run a nonstandard route like the mark complete action as it's an important learning goal. Otherwise excellent work. |
| #ORDER MATTERS! | ||
| #new task | ||
| # get '/tasks/new', to: 'tasks#new', as: 'new_task' | ||
| resources :tasks, only: [:index, :show, :create, :new, :edit, :update, :destroy] |
There was a problem hiding this comment.
I like that you're doing resources, but since you are using all 7 restful routes...
| resources :tasks, only: [:index, :show, :create, :new, :edit, :update, :destroy] | |
| resources :tasks |
| # Act | ||
| get edit_task_path(-1) | ||
|
|
||
| # Assert | ||
| must_respond_with :redirect |
| # TASKS = [ | ||
| # { name: "Kids", description: "Get more workbooks", completed_at: DateTime.now}, | ||
| # { name: "Home", description: "Get more toothpaste"}, | ||
| # { name: "Home", description: "Get coffee now"}, | ||
| # { name: "Charlie", description: "Update shots"}, | ||
| # { name: "Costco", description: "Toilet Paper"}, | ||
| # { name: "Costco", description: "Chicken"}, | ||
| # ] |
There was a problem hiding this comment.
| # TASKS = [ | |
| # { name: "Kids", description: "Get more workbooks", completed_at: DateTime.now}, | |
| # { name: "Home", description: "Get more toothpaste"}, | |
| # { name: "Home", description: "Get coffee now"}, | |
| # { name: "Charlie", description: "Update shots"}, | |
| # { name: "Costco", description: "Toilet Paper"}, | |
| # { name: "Costco", description: "Chicken"}, | |
| # ] |
| redirect_to task_path(@task.id) #goes to page where task/:id page | ||
| return | ||
| else # save failed :( | ||
| render :new # show the new task form view again |
There was a problem hiding this comment.
| render :new # show the new task form view again | |
| render :new, status: :bad_request # show the new task form view again |
| redirect_to task_path # go to the index so we can see the book in the list | ||
| return | ||
| else # save failed :( | ||
| render :edit # show the new book form view again |
There was a problem hiding this comment.
| render :edit # show the new book form view again | |
| render :edit, status: :bad_request # show the new book form view again |
| <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> | ||
| </head> | ||
|
|
||
| <body> |
There was a problem hiding this comment.
I suggest you add navigation links for things like a home link and creating a new task.
| @@ -0,0 +1,14 @@ | |||
| <%= form_with model: @task, class: 'edit-task' do |f| %> | |||
There was a problem hiding this comment.
Just a note, we didn't assign this for task list, but in future projects you can dry up the forms with a partial view.
| Time.at(rand * Time.now.to_i) | ||
| end | ||
|
|
||
| tasks = [ |
Task List
Congratulations! You're submitting your assignment!
Comprehension Questions