Class: Accountability::PaymentsController
- Inherits:
-
AccountabilityController
- Object
- ApplicationController
- AccountabilityController
- Accountability::PaymentsController
- Defined in:
- app/controllers/accountability/payments_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/controllers/accountability/payments_controller.rb', line 5 def create @payment = @account.payments.new(payment_params) if @payment.save redirect_to accountability_account_path(@account), notice: 'Payment was completed successfully' else render json: { status: :error, errors: @payment.errors } end end |