Skip to content

Commit

Permalink
🧹 Don't specify the id now that we have a relationship defined
Browse files Browse the repository at this point in the history
  • Loading branch information
zspencer committed Jan 30, 2024
1 parent 264a1a7 commit 739f0b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/furniture/tobias/payout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Payout < ApplicationRecord
def issue
per_beneficiary_amount = (amount / beneficiaries.count)
beneficiaries.each do |beneficiary|
payments.create_with(amount: per_beneficiary_amount).find_or_create_by(beneficiary_id: beneficiary.id)
payments.create_with(amount: per_beneficiary_amount).find_or_create_by(beneficiary: beneficiary)
end
end
end
Expand Down

0 comments on commit 739f0b2

Please sign in to comment.