1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 23:45:21 +02:00

Fix rubocop linting errors

This commit is contained in:
hatz 2025-04-21 10:53:59 -05:00
parent d1eef076f0
commit d9f78b167e
No known key found for this signature in database

View file

@ -3,26 +3,26 @@ module AccountsHelper
content = capture(&block)
render "accounts/summary_card", title: title, content: content
end
# Format account subtype to be more friendly
def format_account_subtype(subtype)
return nil if subtype.nil?
# Mapping of special cases
special_cases = {
"ira" => "IRA",
"401k" => "401(k)",
"hsa" => "HSA",
"hsa" => "HSA"
}
# Convert to title case
subtype_string = subtype.titleize
special_cases.each do |key, value|
# Use word boundaries to ensure we're replacing whole words
subtype_string = subtype_string.gsub(/\b#{key}\b/i, value)
end
subtype_string
end
end