1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 07:39:39 +02:00

Add option to association

This commit is contained in:
Rob Zolkos 2024-02-02 21:25:53 +00:00
parent 71939d6fb5
commit 129daa6a11

View file

@ -3,7 +3,7 @@ class Account < ApplicationRecord
belongs_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: :destroy
scope :depository, -> { where(type: "Depository") }
end