class ActiveSupport::NumberHelper::RoundingHelper
def convert_to_decimal(number)
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