small medium large xlarge



Looking for the Rails 3.0 version of these exercises ( based)?

Activity 1

The cart is currently hidden when the user empties it by redrawing the entire catalog. Can you change the application to use the jQuery UI blind effect instead?

Hint: After the call to hide the #cart, empty the table using the not method to select all of the rows except the .total_line for removal.


Activity 2

Add a button next to each item in the cart. When clicked, it should invoke an action to decrement the quantity of the item, deleting it from the cart when the quantity reaches zero. Get it working without using Ajax first, and then add the Ajax goodness.

Hint: start by adding a member route to post 'decrement' on :line_items.


Page History
  • V4: Sam Ruby [about 4 years ago]
  • V3: Sam Ruby [about 4 years ago]
  • V2: Sam Ruby [about 4 years ago]
  • V1: Sam Ruby [about 4 years ago]