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

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@dzuelke

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.

Show comment Hide comment
@josevalim

josevalim Dec 10, 2011

Contributor

Thanks but we no longer add or change Rails inflections.

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.

Show comment Hide comment
@endorfin

endorfin Dec 10, 2011

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

ActiveSupport::Inflector.inflections do |inflect|
  inflect.irregular 'tooth', 'teeth'
end

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