method
number_with_precision
v1.2.6 -
Show latest stable
- Class:
ActionView::Helpers::NumberHelper
number_with_precision(number, precision=3)public
Formats a number with the specified level of precision. The default level of precision is 3.
number_with_precision(111.2345) => 111.235 number_with_precision(111.2345, 2) => 111.24