instance method distance_translation

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

distance_translation(key, count, locale, scope)

Translates one of the distance_in_words keys. Passing the locale and scope straight through costs nothing per call, where with_options allocated an OptionMerger and merged a Hash for every lookup.

Parameters

key req
count req
locale req
scope req
Source
# File actionview/lib/action_view/helpers/date_helper.rb, line 766
        def distance_translation(key, count, locale, scope)
          if count
            I18n.t(key, count: count, locale: locale, scope: scope)
          else
            I18n.t(key, locale: locale, scope: scope)
          end
        end

Defined in actionview/lib/action_view/helpers/date_helper.rb line 766 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionView::Helpers::DateHelper

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close