Skip to content

Commit

Permalink
🥗🧹 Missed Trust#payouts relationship!
Browse files Browse the repository at this point in the history
  • Loading branch information
zspencer committed Jan 30, 2024
1 parent 84e4f9c commit 5bf375c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/furniture/tobias/trust.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions spec/tobias/trust_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5bf375c

Please sign in to comment.