Created
January 13, 2013 22:12
-
-
Save telagraphic/4526477 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
after_save do |credit| | |
parent_account = credit.account_id | |
account_to_credit = Account.find(account_id) | |
account_to_credit.balance.to_f + credit.amount.to_f | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment