Inspired by the pluralize method in the text_helper, here's a patch that adds an optional count parameter to Inflector.pluralize. Example from the tests:

    assert_equal 'foos', s.pluralize
    assert_equal 'foos', s.pluralize(0)
    assert_equal 'foo', s.pluralize(1)
    assert_equal 'foos', s.pluralize(2)

Attachment: active_support_add_optional_count_parameter_to_pluralize.diff
Description: Binary data


(meh, trac still pukes when I submit a ticket)
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to