New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inflection for "cookies" & "caches", clean up. #3930

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@dzuelke
Copy link

dzuelke commented Dec 10, 2011

Adds rules so "cookies" is correctly singularized to "cookie", and "caches" to "cache", respectively.

Removes irregular rules for "zombies", "move" and "sexes" because none of them are irregular:

  • "zombies" grouped together with "cookies" and the existing "movies" into one rule;
  • "moves" grouped together with "caches" and the existing "shoes" into one rule;
  • "sexes" removed because it's already covered by existing rules and no different from, say "boxes"

Tests amended and adjusted accordingly.

Fix inflection for "cookies" & "caches", clean up.
Adds rules so "cookies" is correctly singularized to "cookie", and "caches" to "cache", respectively.

Removes irregular rules for "zombies", "move" and "sexes" because none of them are irregular:

- "zombies" grouped together with "cookies" and the existing "movies" into one rule;
- "moves" grouped together with "caches" and the existing "shoes" into one rule;
- "sexes" removed because it's already covered by existing rules and no different from, say "boxes"

Tests amended and adjusted accordingly.
@josevalim

This comment has been minimized.

Copy link
Contributor

josevalim commented Dec 10, 2011

Thanks but we no longer add or change Rails inflections.

@josevalim josevalim closed this Dec 10, 2011

@endorfin

This comment has been minimized.

Copy link

endorfin commented Dec 10, 2011

Not necessary, you can change/extend it like this:

ActiveSupport::Inflector.inflections do |inflect|
  inflect.irregular 'tooth', 'teeth'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment