diff --git a/app/furniture/tobias/payout.rb b/app/furniture/tobias/payout.rb index d783afc94..6f9b1a970 100644 --- a/app/furniture/tobias/payout.rb +++ b/app/furniture/tobias/payout.rb @@ -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