Skip to content

armgit / maybe

Public Imported from GitHub
0

The personal finance app for everyone

Add option to association

Rob Zolkos129daa6a1193
diff --git a/app/models/account.rb b/app/models/account.rb
index e5cecf44..7231dfbd 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -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