diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-04 19:23:07 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-04 19:23:07 +0000 |
commit | a693b3becad44f9e1e2fdacab26c1f367ad6ce71 (patch) | |
tree | d7b5e5f5ef09c5d7ac042010783b322467896781 /actionpack/lib/action_view/helpers/text_helper.rb | |
parent | d52cee3e3bb4c45bfd21d3f905e502fa00758def (diff) | |
download | rails-a693b3becad44f9e1e2fdacab26c1f367ad6ce71.tar.gz rails-a693b3becad44f9e1e2fdacab26c1f367ad6ce71.tar.bz2 rails-a693b3becad44f9e1e2fdacab26c1f367ad6ce71.zip |
Fixed TextHelper#pluralize to handle 1 as a string (closes #5905) [rails@bencurtis.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4993 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers/text_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/text_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 36ed899cf0..91f368fa45 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -60,7 +60,7 @@ module ActionView # Attempts to pluralize the +singular+ word unless +count+ is 1. See source for pluralization rules. def pluralize(count, singular, plural = nil) - "#{count} " + if count == 1 + "#{count} " + if count == 1 || count == '1' singular elsif plural plural |