instance method
distance_translation
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
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
-
keyreq -
countreq -
localereq -
scopereq
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