Last active
April 23, 2016 17:19
-
-
Save mauricioklein/da7dacab1beba1cf4e20aa161a82a2c8 to your computer and use it in GitHub Desktop.
Wallet transfer example
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
def transfer | |
amount = params[:amount] | |
Wallet.transaction do | |
@client1.withdrawal(amount) | |
@client2.deposit(amount) | |
end | |
render status: :ok | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment