We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8bb690e + 615e4d1 commit 093fedfCopy full SHA for 093fedf
app/models/transfer.rb
@@ -23,8 +23,8 @@ class Transfer < ApplicationRecord
23
after_create :make_movements
24
25
def make_movements
26
- movements.create(account: Account.find(source_id), amount: -amount.to_i)
27
- movements.create(account: Account.find(destination_id), amount: amount.to_i)
+ movements.create(account: Account.find(source_id), amount: -amount.to_i, created_at: created_at)
+ movements.create(account: Account.find(destination_id), amount: amount.to_i, created_at: created_at)
28
end
29
30
def source_id
0 commit comments