1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 13:19:39 +02:00

Add loan and credit card views (#1268)

* Add loan and credit card views

* Lint fix

* Clean up overview card markup

* Lint fix

* Test fix
This commit is contained in:
Zach Gollwitzer 2024-10-08 17:16:37 -04:00 committed by GitHub
parent 9263dd3bbe
commit fd941d714d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 564 additions and 102 deletions

View file

@ -137,12 +137,16 @@ module ApplicationHelper
end
def format_money(number_or_money, options = {})
return nil unless number_or_money
money = Money.new(number_or_money)
options.reverse_merge!(money.format_options(I18n.locale))
number_to_currency(money.amount, options)
end
def format_money_without_symbol(number_or_money, options = {})
return nil unless number_or_money
money = Money.new(number_or_money)
options.reverse_merge!(money.format_options(I18n.locale))
ActiveSupport::NumberHelper.number_to_delimited(money.amount.round(options[:precision] || 0), { delimiter: options[:delimiter], separator: options[:separator] })