Replace format_price for Budget#formatted_amount

ApplicationHelper#format_price and Budget#formatted_amount has the same
objective and code, but the Budget#formatted_amount method also uses the
currency of the Budget to correctly give currencies format.

By replacing usage of format_price with formatted_amount we can remove
format_price and have a single location for currency format logic.
This commit is contained in:
Bertocq
2018-03-08 13:26:36 +01:00
parent f0dc2a02a5
commit 6e843730b0
2 changed files with 4 additions and 8 deletions

View File

@@ -57,10 +57,6 @@ module ApplicationHelper
SiteCustomization::ContentBlock.block_for(name, locale)
end
def format_price(number)
number_to_currency(number, precision: 0, locale: I18n.locale)
end
def kaminari_path(url)
"#{root_url.chomp("\/")}#{url}"
end