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 - Anna Barklund - Rails Zoo #31

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

Conversation

amb54
Copy link

@amb54 amb54 commented Apr 3, 2017

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 Click on the animals name. Browser sends request with id to controller animals#show. Controller finds the animal with the specific id sends that information to the view show that then pulls all information for that particular animal from the model and sends it back to the browser.
Describe one area of Rails that you gained more clarity on with this assignment Getting a better understanding of the route.
Is there a specific piece of code you'd like more feedback on? In controller edit and update I used session to save the previous path. Is there another way that is more appropriate?
What is one aspect of this project that surprised you? I could not use html img for the path to the picture of the animal. I had to use image_tag. Or did I miss something?

amb54 added 24 commits March 28, 2017 17:24
…l. Migrated the model. Added 5 animals to the database.
…Created a private method animal_params in the controller. Dreated a index.html.erb file in views/animals. The index view creates a simple list of the animals in the browser.
…r to find specific animal. Created a new html.erb file in view called show. The show view presents an animal with a specific id. Created a link in the index-view to the individual animal view.
… as new_animal and a link in the index view. Wrote a method new in the controller that creates a new instance without parameters. Created a view new.html.erb with a html form. Wrote a post in routes and a method create in the controller.
…ex view. Two routes were added (get animals/:id/edit and patch animals/:id). Two action methods were added to the controller (edit and update). Two views were added (edit.html.erb and _form.html.erb). A formhelper were added to _form, and partial was used in both the edit view and the new view. A link was added into the loop in the index view.
…ded to routes. The action method destroy was added to the controller. A link with confirm was added to the loop in the index view.
…_form to edit respectively new. Changed the link in edit to link to the latest path. To do this the action methods edit in the controller were modified to save the previous path and the method update redirects to the saved path.
…n main. Updated application.css with rule set header.
…th correspondent css to make the list view as three columns. Added 20% padding lefte and right for the main.
…he font to the google font Bubblegum. Changed the main background color.
…mage button to the header with subsequent changes in the application.css. Added a lorem ipsum text to the show view.
…column image to the data base. Made some minor corrections to the link buttons in the show view.
…_tag. Changed the class of the buttons in show to button_image
… the image_tag for the image. Removed the height for the buttons from the erb to the css.
…age text for the delete button. Shortened the Lorem ipsum text in the show view.
@PilgrimMemoirs
Copy link

Rails Zoo

What We're Looking For

Feature Feedback
Appropriate Git usage with no extraneous files checked in Well Done - great amount of commits with specific messages!
Answered comprehension questions Well Done
Naming conventions: controller is plural, model is singular Well Done
Overall
Using sessions is definitely a more advanced way of approaching going back to that animal's show page. A more simple simple solution would be to use the show path and pass the animal's id in as an argument.
In rails, you do need to use the image_tag helper instead of using a standard HTML tag - because rails does not handle relative paths the same as when we were working with our static site files.

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