The personal finance app for everyone
Add option to association
Rob Zolkos129daa6a1193
diff --git a/app/models/account.rb b/app/models/account.rbindex e5cecf44..7231dfbd 100644--- a/app/models/account.rb+++ b/app/models/account.rb@@ -3,7 +3,7 @@ class Account < ApplicationRecordbelongs_to :family- delegated_type :accountable, types: %w[ Credit Depository Investment Loan OtherAsset OtherLiability Property Vehicle]+ delegated_type :accountable, types: %w[ Credit Depository Investment Loan OtherAsset OtherLiability Property Vehicle], dependant: :destroyscope :depository, -> { where(type: "Depository") }end