Sha256: 301cff777442e4710ce11a829192fdf092a0888ad31f275b76bbf5be9a615762

Contents?: true

Size: 733 Bytes

Versions: 4

Compression:

Stored size: 733 Bytes

Contents

class TbCheckout::Admin::TransactionsController < Spud::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

4 entries across 4 versions & 1 rubygems

Version Path
tb_checkout-1.0.6 app/controllers/tb_checkout/admin/transactions_controller.rb
tb_checkout-1.0.5 app/controllers/tb_checkout/admin/transactions_controller.rb
tb_checkout-1.0.4 app/controllers/tb_checkout/admin/transactions_controller.rb
tb_checkout-1.0.3 app/controllers/tb_checkout/admin/transactions_controller.rb