Flowdock
method

convert

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: NumberToCurrencyConverter
convert() public

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/number_to_currency_converter.rb, line 10
      def convert
        number = self.number.to_s.strip
        format = options[:format]

        if number.to_f.negative?
          format = options[:negative_format]
          number = absolute_value(number)
        end

        rounded_number = NumberToRoundedConverter.convert(number, options)
        format.gsub("%n".freeze, rounded_number).gsub("%u".freeze, options[:unit])
      end
Register or log in to add new notes.