Skip to content

Instantly share code, notes, and snippets.

@mauricioklein
Last active April 23, 2016 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauricioklein/da7dacab1beba1cf4e20aa161a82a2c8 to your computer and use it in GitHub Desktop.
Save mauricioklein/da7dacab1beba1cf4e20aa161a82a2c8 to your computer and use it in GitHub Desktop.
Wallet transfer example
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