Skip to content

Commit

Permalink
🧹 Tobias: We don't need to call id when a relationship is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
zspencer committed Feb 12, 2024
1 parent cbe27e2 commit ee07e89
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 @@ -13,7 +13,7 @@ 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 ee07e89

Please sign in to comment.