Sha256: 951d698e09b899837f0a860ca8250da83986720ffe1d76f315e7871004c561f4

Contents?: true

Size: 358 Bytes

Versions: 30

Compression:

Stored size: 358 Bytes

Contents

module Piggybak
  class PaymentsController < ApplicationController
    def refund
      payment = Payment.find(params[:id])
      payment.order.recorded_changer = current_user.id

      if can?(:refund, payment)
        flash[:notice] = payment.refund
      end

      redirect_to rails_admin.edit_path('Piggybak::Order', payment.order.id)
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
piggybak-0.5.5 app/controllers/piggybak/payments_controller.rb
piggybak-0.5.4 app/controllers/piggybak/payments_controller.rb
piggybak-0.5.3 app/controllers/piggybak/payments_controller.rb
piggybak-0.5.2 app/controllers/piggybak/payments_controller.rb
piggybak-0.5.1 app/controllers/piggybak/payments_controller.rb
piggybak-0.5.0 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.39 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.38 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.37 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.36 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.35 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.34 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.33 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.32 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.31 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.30 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.29 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.28 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.27 app/controllers/piggybak/payments_controller.rb
piggybak-0.4.26 app/controllers/piggybak/payments_controller.rb