From 5bf375c926382e980b6c09fe8120c002209c735b 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=20Missed=20`Trust#payo?= =?UTF-8?q?uts`=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