This project is archived and is in readonly mode.

#6696 ✓invalid
Tero Tilus

ActiveSupport::Inflector, wrong singular for "process"

Reported by Tero Tilus | April 12th, 2011 @ 12:58 PM

You'd expect foo.singularize == foo.singularize.singularize for all strings foo. Singular for "process" should then imo be "process", not "proces" as it is.

$ rails console
> Rails.version
=> "3.0.5"
> "process".singularize
=> "proces"

My specific problem was

> 'ObjectProcess'.singularize
=> 'ObjectProces'

And my fix

ActiveSupport::Inflector.inflections do |inflect|
  ...
  inflect.singular /^(.*process)$/i, '\1'
end

I don't know if this breaks anything else.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages