Skip to content

Instantly share code, notes, and snippets.

@ysv
Created November 19, 2018 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ysv/887231c371218ef82de4e967d0d9633c to your computer and use it in GitHub Desktop.
Save ysv/887231c371218ef82de4e967d0d9633c to your computer and use it in GitHub Desktop.
deposits = [
{ member_id: 1, currency_id: :usd, amount: 1000 },
{ member_id: 1, currency_id: :eur, amount: 2000 },
{ member_id: 2, currency_id: :usd, amount: 100 },
{ member_id: 2, currency_id: :eur, amount: 200 }
]
deposits.map do |d|
Deposits::Fiat.create!(d).tap(&:accept!)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment