Giter VIP home page Giter VIP logo

pet_store's Introduction

Pet Store

Congratulations! You've just been hired by Purrfect Pets as their new web developer. It's your job to create a website where prospective pet parents can see all the adorable animals waiting to be adopted.

You're creating an app from scratch, so fork and clone this README, and start with rails new {{app_name}} -G (the -G keeps rails from making a new Git repo, since you're already cloning an existing one)

Deliverables

  • Create a Pet model with the following attributes:
    • name - string
    • species - string (stick to "dog", "cat" and "bird" for now)
    • year_of_birth - integer
    • good_with_kids? - boolean

Make sure your routes are following RESTful conventions!

  • Home page at / welcoming people to your pet store

  • Create an index page at /pets that lists all animals

  • Each animal should be a link to that pet's detail page

    • detail page should list the pet's name in the format of "Petey the Cat"
    • should list the pet's age (not the birth year! Figure out the age without hardcoding the current year)
    • Either "Good with children" or "Prefers a home without children"
    • detail page should link back to index page
  • Create pages at /dogs, /cats and /birds listing the respective animals. (Hint: Do you really need another view here, or can you use something you've already built?)

Bonus

  • Add a column to the database to store a url to the picture of an animal. Show the picture on the pet's detail page
  • Provide links on your index page to sort by age or alphabetically by name. Don't make a new route: use get parameters to let your user choose how to sort (hint: ?sort_by=name or ?sort_by=age). You'll need to Google!

pet_store's People

Contributors

paulnicholsen27 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.