Skip to content

Commit 615e4d1

Browse files
authored
[FIX] Import transfer: movements & transfer with the same created_at
1 parent 9e5c05f commit 615e4d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/transfer.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class Transfer < ApplicationRecord
2323
after_create :make_movements
2424

2525
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)
26+
movements.create(account: Account.find(source_id), amount: -amount.to_i, created_at: created_at)
27+
movements.create(account: Account.find(destination_id), amount: amount.to_i, created_at: created_at)
2828
end
2929

3030
def source_id

0 commit comments

Comments
 (0)