marineb / rack-get-params-lab-v-000

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rack Routes and GET Params

We've provided the code for a basic list of items. Now it's your turn to extend it.

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 then add it to the cart if it is. Otherwise give an error

View Rack Routes and GET Params on Learn.co and start learning to code for free.

About

License:Other


Languages

Language:Ruby 100.0%