Sha256: b9cf84032a300ab3643191f4e9a52813b9d2322bfef6753673d703e24f657b10

Contents?: true

Size: 727 Bytes

Versions: 3

Compression:

Stored size: 727 Bytes

Contents

class TbCheckout::Admin::TransactionsController < Admin::ApplicationController
  belongs_to_spud_app :transactions
  add_breadcrumb 'Transactions', :tb_checkout_admin_transactions_path
  before_action :load_transaction, :only => :show

  def index
    @transactions = TbCheckout::Transaction.order('created_at desc').paginate(:page => params[:page])
    respond_with @transactions
  end

  def show
    respond_with @transaction
  end

private

  def load_transaction
    @transaction = TbCheckout::Transaction.where(:id => params[:id]).first
    if @transaction.blank?
      flash[:error] = 'Could not find the requested Transaction'
      redirect_to tb_checkout_admin_transactions_path
      return false
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_checkout-1.1.1 app/controllers/tb_checkout/admin/transactions_controller.rb
tb_checkout-1.1.0 app/controllers/tb_checkout/admin/transactions_controller.rb
tb_checkout-1.0.7 app/controllers/tb_checkout/admin/transactions_controller.rb