2024-02-02 09:05:04 -06:00
|
|
|
class Account < ApplicationRecord
|
2024-02-02 21:33:43 +00:00
|
|
|
# VALID_ACCOUNT_TYPES = %w[Investment Depository Credit Loan Property Vehicle OtherAsset OtherLiability].freeze
|
2024-02-02 17:15:12 +00:00
|
|
|
|
2024-02-02 09:05:04 -06:00
|
|
|
belongs_to :family
|
2024-02-02 11:09:31 -06:00
|
|
|
|
2024-02-02 21:34:24 +00:00
|
|
|
delegated_type :accountable, types: %w[ Credit Depository Investment Loan OtherAsset OtherLiability Property Vehicle], dependent: :destroy
|
2024-02-02 23:09:35 +00:00
|
|
|
|
2024-02-02 17:15:12 +00:00
|
|
|
scope :depository, -> { where(type: "Depository") }
|
2024-02-02 09:05:04 -06:00
|
|
|
end
|