negative a different way
This commit is contained in:
parent
7c1d03bc1d
commit
b4f9a948ca
1 changed files with 2 additions and 2 deletions
4
app.rb
4
app.rb
|
@ -69,8 +69,8 @@ end
|
||||||
def readable_number(value)
|
def readable_number(value)
|
||||||
negative = false
|
negative = false
|
||||||
|
|
||||||
#negative = true if value =~ /\-/
|
negative = true if value.to_f < 0
|
||||||
#value.gsub!(/-/, '')
|
value.gsub!(/-/, '')
|
||||||
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