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 Rails Zoo #25

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

Conversation

add2point71dots
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 the user clicks on an animal, the browser sends a request, which goes to the router, which interprets the path (in this case, get is the http verb, and the path is /animals/[the id of that animal]). The route specifies that this path is linked with the animals#show method in the controller. In the controller, the show method sets an instance variable @animal to the correct animal by finding it (via the id) using the Animal class in the model (which interacts with the database). The controller then gets the view from the show.html.erb file, which gets dynamically filled with data by using the @animal instance variable. The controller then sends this data-filled view back to the browser to display to the user.
Describe one area of Rails that you gained more clarity on with this assignment It was just good to get more practice! Though I still had to check my notes a couple of times, doing this right after Task List, I had much better luck remembering the right commands and knowing where all the different files were and how they needed to interact.
Is there a specific piece of code you'd like more feedback on? My navigation is in the application file, so I conditionally added a class to the <li> that I wanted to look "selected" for styling purposes. The way I did it leaves an empty class for the <li> that isn't selected - is that considered acceptable? I originally had an if/else that would either put a <li class="selected"> or just <li>, but that seemed messier.
What is one aspect of this project that surprised you? Hmm, I'm not sure anything surprised me too much, since it was pretty similar to Task List. I did try out one new CSS thing that I'm still not entirely sure how it works, so I suppose it was surprising that that worked out. I wanted my site to fill up the whole height of my screen, even when there wasn't enough content to make it tall enough. I found a solution that used display: flex on the body (along with a couple other things) and then flex: 1 on main. Not 100% sure what those properties do, but I would like to play around with them more and find out!

@kariabancroft
Copy link

Rails Zoo

What We're Looking For

Feature Feedback
Appropriate Git usage with no extraneous files checked in Yes
Answered comprehension questions Yes. An empty class= is actually pretty common (and used a lot with JavaScript) so that was a good solution.
Naming conventions: controller is plural, model is singular Yes
Overall Nice job!

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