mirror of
https://github.com/internetee/registry.git
synced 2025-05-28 15:19:55 +02:00
Add activity type field #2691
This commit is contained in:
parent
fa4a2d2987
commit
d6a151b141
9 changed files with 45 additions and 67 deletions
|
@ -4,6 +4,10 @@ class AccountActivity < ActiveRecord::Base
|
|||
belongs_to :bank_transaction
|
||||
belongs_to :invoice
|
||||
|
||||
CREATE = 'create'
|
||||
RENEW = 'renew'
|
||||
ADD_CREDIT = 'add_credit'
|
||||
|
||||
after_create :update_balance
|
||||
def update_balance
|
||||
account.balance += sum
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue