ActionView::Helpers::TextHelper
def pluralize(count, singular, plural_arg = nil, plural: plural_arg, locale: I18n.locale)

Description

Returns the count followed by the word, in the singular or plural form to match the count.

Arguments

Changing a value updates the ERB and HTML.

If the count is 1 (including strings such as "1.0"), uses the singular argument as is; otherwise, uses the plural form. Returns the count and the word joined with a space.
The singular form of the word. The plural form is derived from it using Rails' inflection rules.
= nil
Uses the given word as the plural form instead of deriving it from the rules.
= nil
The locale whose inflection rules are used. Defaults to the current locale (:en on this page). There are no inflection rules for Japanese, so :ja leaves the word unchanged.

ERB

Changes from the previous output: Added Removed Changed


          

HTML