Flowdock
method

convert_to_decimal

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: RoundingHelper
convert_to_decimal(number) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/number_helper/rounding_helper.rb, line 42
        def convert_to_decimal(number)
          case number
          when Float, String
            BigDecimal(number.to_s)
          when Rational
            BigDecimal(number, digit_count(number.to_i) + precision)
          else
            number.to_d
          end
        end
Register or log in to add new notes.