Flowdock
method

convert_to_decimal

Importance_0
v6.1.3.1 - 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 26
        def convert_to_decimal(number)
          case number
          when Float, String
            BigDecimal(number.to_s)
          when Rational
            BigDecimal(number, digit_count(number.to_i) + options[:precision])
          else
            number.to_d
          end
        end
Register or log in to add new notes.