From f0caabfb534362576cee31746dc978cd8e3737ed Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Tue, 4 Aug 2009 13:13:46 +0200 Subject: [PATCH] Check account balance after creating a transaction. --- app/controllers/finance/transactions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/finance/transactions_controller.rb b/app/controllers/finance/transactions_controller.rb index 76c96d6d..91380ade 100644 --- a/app/controllers/finance/transactions_controller.rb +++ b/app/controllers/finance/transactions_controller.rb @@ -73,7 +73,7 @@ class Finance::TransactionsController < ApplicationController begin @group.add_financial_transaction(amount, note, @current_user) flash[:notice] = 'Transaktion erfolgreich angelegt.' - redirect_to :action => 'index' + redirect_to :action => 'list', :id => @group rescue => e @financial_transaction = FinancialTransaction.new(params[:financial_transaction]) flash.now[:error] = 'Transaktion konnte nicht angelegt werden!' + ' (' + e.message + ')'