Sha256: 9ff2944070e6d123e057e8aa6c8e198910f3d46a672c5324a502e9a4ef465c56

Contents?: true

Size: 279 Bytes

Versions: 2

Compression:

Stored size: 279 Bytes

Contents

module ActionView
  module Helpers #:nodoc:
    module TextHelper
      def pluralize(count, singular, plural = nil)
        "#{count || 0} " + ((count == 1 || count == '1') ? singular : (plural || ActiveSupport::Inflector.pluralize(singular, count)))
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pluralize-0.2.0 lib/pluralize/action_view/helpers/text_helper.rb
pluralize-0.1 lib/pluralize/action_view/helpers/text_helper.rb