Class: Jackpot::PaymentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/jackpot/payments_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



5
6
7
8
9
10
11
12
13
# File 'app/controllers/jackpot/payments_controller.rb', line 5

def create
  @customer = Jackpot::Customer.find params[:customer_id] 

  respond_to do |format|
    if @customer.pay_subscription
      format.html { redirect_to(payments_url, notice: "Payment recorded successfully")} 
    end
  end 
end

#indexObject



15
16
17
# File 'app/controllers/jackpot/payments_controller.rb', line 15

def index
  @payments = Payment.all
end