From 739f0b2fc8c4e3d265af91f6d029d8f04cfee259 Mon Sep 17 00:00:00 2001 From: Zee Spencer <50284+zspencer@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:05:52 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Don't=20specify=20the=20`id`=20n?= =?UTF-8?q?ow=20that=20we=20have=20a=20relationship=20defined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/furniture/tobias/payout.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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