mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix code style a bit
This commit is contained in:
parent
b80cf265be
commit
88dfe16d95
1 changed files with 1 additions and 2 deletions
|
@ -459,8 +459,7 @@ module ActionView
|
|||
raise ArgumentError, ":units must be a Hash or String translation scope."
|
||||
end.keys.map{|e_name| DECIMAL_UNITS.invert[e_name] }.sort_by{|e| -e}
|
||||
|
||||
number_exponent = 0
|
||||
number_exponent = Math.log10(number).floor if number != 0
|
||||
number_exponent = number != 0 ? Math.log10(number).floor : 0
|
||||
display_exponent = unit_exponents.find{|e| number_exponent >= e }
|
||||
number /= 10 ** display_exponent
|
||||
|
||||
|
|
Loading…
Reference in a new issue