-
Notifications
You must be signed in to change notification settings - Fork 47
Space - Kate #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Space - Kate #43
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| # 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Task List
Congratulations! You're submitting your assignment!
Comprehension Questions