Skip to content

Conversation

@codesrobertson
Copy link

Task List

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe in your own words what the Model is doing in Rails The model is handling the data of the application.
Describe in your own words what the Controller is doing in Rails The controller is handling the decisions about the data/user intent.
Describe in your own words what the View is doing in Rails The view is handling the presentation, or the HTML that shows up in the application.
Describe an edge-case controller test you wrote N/A
What is the purpose of using strong params? (i.e. the params method in the controller) The purpose of using strong params is to write more secure, cleaner code.
How are Rails migrations related to Rails models? Rails migrations can be generated with models, or separately from models. That said, migrations affect how the information the models handle for the application.
Describe one area of Rails that are still unclear on I'd like to know more about database paradigms, like document, k-v. object, and graph. I'd like to know what each are used for in a practical setting. I also didn't get around to testing in Rails, so I'd like to learn more on that.

Copy link

@beccaelenzil beccaelenzil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@beccaelenzil
Copy link

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 You're at a good commit cadence. I expect you'd have a few more commits once you implemented destroy and mark_complete actions.
Routes follow RESTful conventions ✔️
Uses named routes (like _path) ✔️
Creates Models and migrations ✔️
Creates styled views No, but this was not a requirement
Handles errors like nonexistant tasks ✔️Yes! With a redirect to the tasks_path.
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 ✔️
Successfully handles: Destroy, Task Complete These are incomplete

Overall Feedback

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 5+ in Code Review && 5+ in Functional Requirements ✔️

Code Style Bonus Awards

Was the code particularly impressive in code style for any of these reasons (or more...?)

Quality Yes?
Descriptive/Readable
Concise
Logical/Organized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants