a guest Mar 13th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- i have a simple shopping cart built, with Products and Carts and LineItems (which have a cart_id, product_id, and a quantity). How can I nest the routes such that the routes will be something like, "/carts/:id/products/:id" so a restful DELETE on that url will actually delete the line_item
- map.resources :products do |product|
- product.resources :carts do |cart|
- cart.resources :lineitems
RAW Paste Data