From a0ee024fc8afdeb21bdc0e5de9d503337029e4a9 Mon Sep 17 00:00:00 2001 From: Zee Spencer <50284+zspencer@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:08:02 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=97=F0=9F=A7=B9=20`Tobias`:=20Missed?= =?UTF-8?q?=20`Trust#payouts`=20relationship!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/furniture/tobias/trust.rb | 1 + spec/tobias/trust_spec.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/app/furniture/tobias/trust.rb b/app/furniture/tobias/trust.rb index d8dfbc071..357c690fd 100644 --- a/app/furniture/tobias/trust.rb +++ b/app/furniture/tobias/trust.rb @@ -3,5 +3,6 @@ class Trust < ApplicationRecord self.table_name = "tobias_trusts" has_many :beneficiaries, inverse_of: :trust, dependent: :destroy + has_many :payouts, inverse_of: :trust, dependent: :destroy end end diff --git a/spec/tobias/trust_spec.rb b/spec/tobias/trust_spec.rb index f0d61e935..1ae161b9b 100644 --- a/spec/tobias/trust_spec.rb +++ b/spec/tobias/trust_spec.rb @@ -4,4 +4,8 @@ describe "#benificiaries" do it { is_expected.to have_many(:beneficiaries).inverse_of(:trust).dependent(:destroy) } end + + describe "#payouts" do + it { is_expected.to have_many(:payouts).inverse_of(:trust).dependent(:destroy) } + end end