On 27 October 2010 14:07, Rob Biedenharn <r...@agileconsultingllc.com> wrote: > > If you're just in plain Ruby, it might depend on the pluralization rule: > > "#{n} month#{'s' unless n == 1}" > > "#{n} part#{n == 1 ? 'y' : 'ies'}" > > "#{n} fish" >
You can also use String.pluralize "#{n} {n == 1 ? 'month' : 'month'.pluralize}" http://apidock.com/rails/ActiveSupport/Inflector/pluralize -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.