Advertisement
Guest User

Untitled

a guest
Oct 12th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.29 KB | None | 0 0
  1.       def update
  2.         @shopping_cart.cart_items = []
  3.  
  4.         if @shopping_cart.update_attributes(shopping_cart_attributes)
  5.           render json: @shopping_cart.cart_items
  6.         else
  7.           render json: { errors: @shopping_cart.cart_items.errors_message }
  8.         end
  9.       end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement