Flowdock
method

determine_unit

Importance_0
v4.2.7 - Show latest stable - 0 notes - Class: NumberToHumanConverter
determine_unit(units, exponent) 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 35
        def determine_unit(units, exponent)
          exp = DECIMAL_UNITS[exponent]
          case units
          when Hash
            units[exp] || ''
          when String, Symbol
            I18n.translate("#{units}.#{exp}", :locale => options[:locale], :count => number.to_i)
          else
            translate_in_locale("human.decimal_units.units.#{exp}", count: number.to_i)
          end
        end
Register or log in to add new notes.