Module: RailsPerformanceHelper

Defined in:
app/helpers/rails_performance_helper.rb

Instance Method Summary collapse

Instance Method Details

#round_it(value) ⇒ Object



2
3
4
5
6
7
# File 'app/helpers/rails_performance_helper.rb', line 2

def round_it(value)
  return nil unless value
  return value if value.is_a?(Integer)

  value.nan? ? nil : value.round(2)
end