Skip to content

Stacks- Rana-Rails-Zoo #15

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

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

Conversation

RanaSulaiman
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 submit URI address which is animals/2 in the browser, the rails router will receive it as get request and will route it to the controller by the right controller#action (animals#show). Then the controller take over and matches the animals#show in the routes to find show method(action) that has the logic responsible on rendering the information. The controller use the active record advantages that the model inherit from where we can use animal.find(animal id) which returns an animal object with all animal’s attributes saved in the database(schema). The controller will respond to the browser request by rendering the template view file of the same name as the action name. Since the view extension is erb.html, rails will embed ruby code inside the template in order to have a dynamic view
Describe one area of Rails that you gained more clarity on with this assignment Migration and the relationship between migration and schema as generating migration for the first time will create an empty schema and each time we generate migration later will change the schema. Also, I have more confidence of adding more columns to the current database by generating new migration
Is there a specific piece of code you'd like more feedback on? nothing in specific
What is one aspect of this project that surprised you? I am really surprised that the styling took more time than building the functionality of this assignment.

… all 4 animals in the database.2-Updated index.html.erb to iterate over animals params'@Animals' to show all animals on the browser '3000/animals'
…ated controller.rb, Added a new template views/show.html.erb, and Updated routes.rb
…ave the information #create. Now I can render /new empty page since I don't have the new template
… the projecet specification and all it needs is css styling.
@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
Naming conventions: controller is plural, model is singular Yes
Overall Looks great!

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