Matt Jones wrote in post #1024650:
> I suspect you've got an initializer that added the correct
> pluralization rule that isn't getting picked up in 3.1. Out-of-the-box
> (on both Rails 2 and 3), "specimen" works like this:
>
> "specimen".pluralize => "specimen"
> "specimen".singularize => "speciman"

Rails 3.1 (just to clarify):
---------
ruby-1.9.2-p290 :003 > "specimen".pluralize
 => "specimen"
ruby-1.9.2-p290 :004 > "specimen".singularize
 => "speciman"

If you wish to use the proper pluralization of "specimen," which is 
"specimens" you'll need to add this to your application's inflections:

config/initializers/inflections.rb
---------------------------
ActiveSupport::Inflector.inflections do |inflect|
  inflect.plural 'specimen', 'specimens'
  inflect.singular 'specimens', 'specimen'
end
-----
Loading development environment (Rails 3.1.0)
ruby-1.9.2-p290 :001 > "specimen".pluralize
 => "specimens"
ruby-1.9.2-p290 :002 > "specimens".singularize
 => "specimen"

-- 
Posted via http://www.ruby-forum.com/.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to