negify`
This commit is contained in:
parent
b4f9a948ca
commit
5ae6675cba
1 changed files with 1 additions and 1 deletions
2
app.rb
2
app.rb
|
@ -70,7 +70,7 @@ def readable_number(value)
|
||||||
negative = false
|
negative = false
|
||||||
|
|
||||||
negative = true if value.to_f < 0
|
negative = true if value.to_f < 0
|
||||||
value.gsub!(/-/, '')
|
value = value * -1
|
||||||
numbers.each do |number, symbol|
|
numbers.each do |number, symbol|
|
||||||
if value.to_f / number.to_f > 1
|
if value.to_f / number.to_f > 1
|
||||||
return sprintf('%.2f', value.to_f / number.to_f) + '<strong>' + symbol + '</strong>'
|
return sprintf('%.2f', value.to_f / number.to_f) + '<strong>' + symbol + '</strong>'
|
||||||
|
|
Loading…
Reference in a new issue