Added comma support #2785

This commit is contained in:
Priit Tark 2015-08-10 20:04:20 +03:00
parent f5311301c9
commit e9cf3d2fbe
15 changed files with 80 additions and 21 deletions

View file

@ -45,4 +45,9 @@ module ApplicationHelper
# can be api user or some other user
link_to(model.updator, ['admin', model.updator])
end
def currency(amount)
amount ||= 0
("%01.2f" % amount.round(2)).sub(/\./, ',')
end
end