Skip to content

Conversation

@lmelgarejos
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 When we click on the name of one animal, we send a request thru the controller which is going to use the action 'show' and chance the route on the browser adding the id of the animal and 'show.html.erb' is going to display the information for this specific id.
Describe one area of Rails that you gained more clarity on with this assignment Forms
Is there a specific piece of code you'd like more feedback on? Routes please.
What is one aspect of this project that surprised you? Routes! I do not have very clear the hierarchy between them, and which verb use for certain action.

@PilgrimMemoirs
Copy link

Rails Zoo

What We're Looking For

Feature Feedback
Appropriate Git usage with no extraneous files checked in Could use more commits
Answered comprehension questions Mostly good - in what specific order are those events occurring once the link is being clicked? Hint: it starts with calling that url, which goes to the route.
Naming conventions: controller is plural, model is singular Well Done
Overall
Routes Your routes all look good, except for the one in the box below. Because you're updating the animal, you need to use either the patch or put method - in this case patch is a good choice, which you are doing with this method: patch 'animals/:id', to: 'animals#update'. Because you have that method, the one below is never being used. An edit action will always use the GET http method to render the edit form - at that point it isn't updating anything yet, it's only getting the form to do so.
post 'animals/:id/edit', to: 'animals#edit'

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