1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-23 07:09:39 +02:00
Maybe/app/models/account.rb

10 lines
348 B
Ruby
Raw Normal View History

2024-02-02 09:05:04 -06:00
class Account < ApplicationRecord
2024-02-02 11:10:14 -06: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 23:09:35 +00:00
delegated_type :accountable, types: %w[ Credit Depository Investment Loan OtherAsset OtherLiability Property Vehicle]
2024-02-02 17:15:12 +00:00
scope :depository, -> { where(type: "Depository") }
2024-02-02 09:05:04 -06:00
end