Flowdock
method

unit_exponents

Importance_0
v4.2.7 - Show latest stable - 0 notes - Class: NumberToHumanConverter
unit_exponents(units) 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/number_to_human_converter.rb, line 52
        def unit_exponents(units)
          case units
          when Hash
            units
          when String, Symbol
            I18n.translate(units.to_s, :locale => options[:locale], :raise => true)
          when nil
            translate_in_locale("human.decimal_units.units", raise: true)
          else
            raise ArgumentError, ":units must be a Hash or String translation scope."
          end.keys.map { |e_name| INVERTED_DECIMAL_UNITS[e_name] }.sort_by { |e| -e }
        end
Register or log in to add new notes.