1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-25 08:09:38 +02:00

Fix accountable type references in new account flow (#395)

* Fix accountable type references in new account flow

* Add remaining references

* Refactor accountable type checking

* Refactor new account template to use account

* Refactor account create action

* Refactor account sidebar
This commit is contained in:
Josh Brown 2024-02-09 14:26:54 +00:00 committed by GitHub
parent 80f68b657c
commit f8174990ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 29 deletions

View file

@ -1,7 +1,7 @@
class Account < ApplicationRecord
belongs_to :family
delegated_type :accountable, types: %w[ Account::Credit Account::Depository Account::Investment Account::Loan Account::OtherAsset Account::OtherLiability Account::Property Account::Vehicle], dependent: :destroy
delegated_type :accountable, types: Accountable::TYPES, dependent: :destroy
delegate :type_name, to: :accountable