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
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