Skip to content
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

Addie's Task List #21

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

Conversation

add2point71dots
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 has a lot of business logic for dealing with our data. It interacts with the database and defines classes for the objects that will be created from data in the database.
Describe in your own words what the Controller is doing in Rails The controller receives requests from the browser, interacts with the model to get data, interacts with views to get the right view for the data, and returns a response to the browser.
Describe in your own words what the View is doing in Rails The views are templates for displaying the data. They generally consist of html, css, and embedded ruby.
What is the purpose of using strong params? (i.e. the params method in the controller) strong params are a security feature so that extra code can't be slipped into our application by a user. When creating a new object by accepting a hash, strong params allow us to only accept specifically named keys within the hash.
How are Rails migrations related to Rails models? A rails migration changes the database schema. You can create a new model and migration at the same time with rails generate model. If you need a migration without creating a new model, you can do so with rails generate migration.
Describe one area of Rails that are still unclear on I'm still not 100% clear on what the different http verbs do other than make our paths different and more readable. If I wrote methods in the controller that were exactly the same and used paths that were the same except for the http verb, (let's say one with post and one with get), would they do different things? I know it wouldn't be restful, but I don't know if the verbs actually have different functionality when set up in the same way.

@kariabancroft
Copy link

Task List

What We're Looking For

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in Yes
Answered comprehension questions Yes. Regarding your HTTP verbs question - I understand! The verbs provide the purpose of the route & action rather than any guarantee of what is happening. So while you could technically write anything you want in the controller, you wouldn't do that if you're following the RESTful conventions.
Successfully handles: Index, Show Yes. Note for the completion behavior, you could conditionally set the character and then utilize a single link_to using a variable so you didn't have to duplicate the path and method.
Successfully handles: New, Create Yes. Nice job using the partial.
Successfully handles: Edit, Update Yes. Nice job using the partial.
Successfully handles: Destroy, Task Complete Yes. I like the way you specified that this is "toggling" the completion.
Routes follow RESTful conventions Yes. I like the way you grouped them together.
Uses named routes (like _path) Yes
Overall Nice job - you explored each piece of the request cycle.

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