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

Janice's Task List #46

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

Janice's Task List #46

wants to merge 4 commits into from

Conversation

janicewilson
Copy link

@janicewilson janicewilson commented Apr 1, 2017

My apologies, Kari and Chris! I made the (optimistic?) assumption that all was due by Monday! I'm currently in Houston en route to the Seattle. I scrambled on the flight from Memphis to put something together for the task list. It ain't pretty. But I think I hit all the requisites. I'll be certain to add sparkle to my Zoo/RSVP effort tomorrow!

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 the liaison between the Controller and the Database. In this case, the Model creates and/or mutates Task objects, which in turn represent the data in a corresponding row, according to the whims (e.g. update or new) of the Controller.
Describe in your own words what the Controller is doing in Rails The Controller is the ultimate point person, receiving the baton from the Routes, then deciding, according to which Controller Actions are triggered, whether Views or Controller gets the baton next. The baton is always returned to the Controller at which point, the Controller pass the baton to the View or the Model for a few more rounds before doing a final pass back to the Routes.
Describe in your own words what the View is doing in Rails The View passes to the Controller the framework that will ultimately serve as indication for the user that her request has been sent, sometimes received and sometimes acted upon by said Controller.
What is the purpose of using strong params? (i.e. the params method in the controller) Preventing a sneak attack by someone stuffing something distasteful into the hash that should be gainfully employed as the values of that Object's attributes.
How are Rails migrations related to Rails models? Migrations are the conduits by which Models, and the tables said Models represent, are created and changed.
Describe one area of Rails that are still unclear on Not certain whether my use of MATCH was apropos. I (think I) understood that my routing was sending mix signals when I attempted to use the same HTTP verb and URL for more than one action. (#update and #complete). I'd like to understand how to accomplish the same without using MATCH.

…at all was due by Monday\! I'm currently in Houston en route to the Seattle. I scrambled on the flight from Memphis to put something together for the task list. It ain't pretty. But I believe I hit the requisites. I'll be certain to add sparkle to my zoo/RSVP app tomorrow\!
@CheezItMan
Copy link

Task List

What We're Looking For

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in Only one commit, I realize you had to do it quickly on the fly, so to speak.
Answered comprehension questions Check, the View presents the user interface which
Successfully handles: Index, Show Check
Successfully handles: New, Create Check
Successfully handles: Edit, Update Check
Successfully handles: Destroy, Task Complete Check
Routes follow RESTful conventions Check
Uses named routes (like _path) Check
Overall You satisfied all the basic requirements, no CSS or styling, but it all works! Nice work, and quickly!

@janicewilson
Copy link
Author

Thanks, Chris, for the quick turnaround. And again, apologies for the delinquency. Any chance you've time to give feedback on how I implemented the "task completed"? Is use of match appropriate and/or good/best practice?

@CheezItMan
Copy link

CheezItMan commented Apr 3, 2017

Apologies, I should have commented on this. The status field for the Task model you could probably drop because if the completed_at field is set then the task is completed.

For the routes.rb file, we generally use match for routes that work for more than one http verb. So in this case since you're only doing a PUT request it should probably be:

put '/tasks/complete/:id', to: 'tasks#complete', as: 'complete_task'

match is also something we generally don't use often.

http://guides.rubyonrails.org/routing.html#http-verb-constraints

@janicewilson
Copy link
Author

Ah! That’s helpful! I was glued to the “naming convention” task/:id/action. Didn’t realize it was fake glue. Thanks for taking the time to respond!!

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