Some tests for invoice binding

This commit is contained in:
Martin Lensment 2015-04-14 19:00:38 +03:00
parent e678e655da
commit 57d23976c7
19 changed files with 206 additions and 25 deletions

View file

@ -1,4 +1,12 @@
class AccountActivity < ActiveRecord::Base
belongs_to :account
belongs_to :bank_transaction
belongs_to :invoice
after_create :update_balance
def update_balance
account.balance += sum
account.save
end
end