Git Product home page Git Product logo

rack-get-params-lab's Introduction

Rack Routes and GET Params

We've provided the code for a basic list of items. Now it's your turn to extend it. Do your work in app/application.rb.

Vocabulary Word: "Route"

In applications built on Rack, we use the noun "route" to refer to a path that the application has a special response to.

So, for example, if we navigated to a /shoes route, we would expect the application to show us information about shoes. A /profile route might show information about a user who's logged in to an application. Finally, a /logout route might update some information to let the server know the user is no longer logged in.

Instructions

  1. Create a new class array called @@cart to hold any items in your cart.
  2. Create a new route called /cart to show the items in your cart.
  3. Create a new route called /add that takes in a GET param with the key item. This should check to see if that item is in @@items and add it to the cart if it is. Otherwise it should give an error.

rack-get-params-lab's People

Contributors

aviflombaum avatar dependabot[bot] avatar ihollander avatar lizbur10 avatar maxwellbenton avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rack-get-params-lab's Issues

Define term 'route' more clearly before this lab

Previous lessons do not define the term "route" as it pertains to which methods are needed clearly enough for the ask in this lab to make immediate sense (to a person brand new to Rack). I am noticing this Bonus Rack section that I am taking more time than usually to try and find what these asks really need or want.

Small typo

"Do you work in app/application.rb."
Should be "Do your" work in ...

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.