1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

Remove styling configuration for account types out (#284)

* Remve styling configuration for account types out

* No need to tailwind config for models
This commit is contained in:
Rob Zolkos 2024-02-03 15:38:52 -05:00 committed by GitHub
parent 9b400c9c50
commit a2b96db75d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 13 additions and 102 deletions

View file

@ -3,12 +3,5 @@ class Account < ApplicationRecord
delegated_type :accountable, types: %w[ Account::Credit Account::Depository Account::Investment Account::Loan Account::OtherAsset Account::OtherLiability Account::Property Account::Vehicle], dependent: :destroy
delegate :icon, :type_name, :color, to: :accountable
# Class method to get a representative instance of each accountable type
def self.accountable_type_instances
accountable_types.map do |type|
type.constantize.new
end
end
delegate :type_name, to: :accountable
end