Sha256: da5e5a377ec1dfd06c85e1e4adc2d3845d1be6b78f7055818a902d98267ecf8c

Contents?: true

Size: 462 Bytes

Versions: 5

Compression:

Stored size: 462 Bytes

Contents

module RightnowOms
  class CartsController < ApplicationController
    before_filter :load_or_create_cart, only: :show
    before_filter :load_cart, only: :destroy

    def show
      respond_to do |format|
        format.html { render :show, layout: 'rightnow_oms/cart' }
        format.json { render_for_api :default, json: @cart, root: :cart, status: :ok }
      end
    end

    def destroy
      @cart.destroy if has_cart?

      head :ok
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rightnow_oms-0.1.6 app/controllers/rightnow_oms/carts_controller.rb
rightnow_oms-0.1.4 app/controllers/rightnow_oms/carts_controller.rb
rightnow_oms-0.1.3 app/controllers/rightnow_oms/carts_controller.rb
rightnow_oms-0.1.2 app/controllers/rightnow_oms/carts_controller.rb
rightnow_oms-0.1.1 app/controllers/rightnow_oms/carts_controller.rb