Sha256: 8728497a3bc39f0fb36b16a56d81c99d2cb64f1bbf51ffbff7d928e2ddef394f

Contents?: true

Size: 325 Bytes

Versions: 3

Compression:

Stored size: 325 Bytes

Contents

class TbCommerce::CartsController < ApplicationController

  before_action :load_cart

  def show
    render 'show'
  end

private

  def load_cart
    @cart = tb_commerce_current_cart
  end

  def require_cart_not_empty
    if @cart.cart_is_empty?
      redirect_to tb_commerce_cart_path and return false
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_commerce-0.0.4 app/controllers/tb_commerce/carts_controller.rb
tb_commerce-0.0.3 app/controllers/tb_commerce/carts_controller.rb
tb_commerce-0.0.2 app/controllers/tb_commerce/carts_controller.rb