app/controllers/orders_controller.rb
# GET orders/
# Basic function to display cart
GET orders
Basic function to display cart
GET orders Basic function to display cart
def index()
    @carts = current_user.carts.all
    @product_id = @carts.map{|h| h.product_id }
    @products = Product.where("id IN (?)", @product_id)
  end
def index ( ) @carts = current_user . carts . all @product_id = @carts . map { | h | h . product_id } @products = Product . where ( "id IN (?)" , @product_id ) end
GET orders
Basic function to display cart
GET orders Basic function to display cart
# Generate Products