Skip to content

Instantly share code, notes, and snippets.

@telagraphic
Created January 13, 2013 22:12
Show Gist options
  • Save telagraphic/4526477 to your computer and use it in GitHub Desktop.
Save telagraphic/4526477 to your computer and use it in GitHub Desktop.
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