Skip to content

Instantly share code, notes, and snippets.

@dereknguyen269
Created September 5, 2016 13:14
Show Gist options
  • Save dereknguyen269/be9507acbf86b7ff0184fc188e0a6cd9 to your computer and use it in GitHub Desktop.
Save dereknguyen269/be9507acbf86b7ff0184fc188e0a6cd9 to your computer and use it in GitHub Desktop.
if account.balance >= item.price
account.balance = account.balance - item.price
#some other long processes here
account.save
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment