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

Queues - Erica Jase - #20

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

Conversation

EricaJCasePhD
Copy link

Rails Zoo

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe in your own words the Rails request/response cycle for viewing an animals detail page
(I view this as a dialogue. These aren't really my words, but they are far better than my words.)

*Browser: Hey there, router, could you please GET animals/:id ?
*Router: (I am not really sure if the router says anything to the browser. Please advise.)
...Hello, animals controller, could you please show me the page for animal :id, and by that I
clearly mean animals#show
*Controller: Sure thing (I don't think the controller actually says this.) .
...Subordinate model, retrieve animal id from the database (you know, Animal.find(params[:id])
*Model: here is the information for animal id
*Controller: stores information in instance variable
...Hi, view animals/:id , I have information for animal :id, but I don't know how to display it. What
should I do?
*View: OK, controller, here is how you should display this information speaks a bunch of html
*Controller: (To self) That view talks like a cave man. I will add some introductory paragraphs so ...that the browser can understand these directions.
*Controller: Hello browser, remember that one time when you asked me to #GET animal/:id? I got the information from Controller and the display template from view. I also made it extra easy to ...understand for you.
...Now all you have to do is POST animals/:id
*Browser: Done! It looks like there is nothing else to do.

Then the Browser, the Controller, the View, and the Model all high five. (This doesn't really happen, but it makes for a more satisfying script.)

| Describe one area of Rails that you gained more clarity on with this assignment |
Which HTTP: verbs are being used (since I had a bazillion errors with POST requests) |

| Is there a specific piece of code you'd like more feedback on? |
No. But I would like to know if I got the first question here right. |

| What is one aspect of this project that surprised you?|
Getting an image from the Internet is harder than I thought it would be . Google api is really, really hard to figure out because so much of it is deprecated. |

@EricaJCasePhD
Copy link
Author

I am very sorry if the images for my page are wrong or inappropriate. I used loremflickr which gets the right animal about 50% of the time, and posts something you'd rather not see about 10% of the time. I would recommend not going to the page for Bonobo.

Also, it was really, really fun to write the dialogue for the post animal id loop. I think it would be a great seat squad activity for next time.

@PilgrimMemoirs
Copy link

Rails Zoo

What We're Looking For

Feature Feedback
Appropriate Git usage with no extraneous files checked in Need to commit more often
Answered comprehension questions Well Done - your answer demonstrates a solid understanding of the rails request cycle
Naming conventions: controller is plural, model is singular Well Done
Overall
Edit and Delete functionality not complete
Button to create a new animal is erroring - why is it giving me "No route matches [POST] "/animals/new" "?

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