Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #932 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[PATCH] Inflector incorrectly pluralizes capitalized words

Reported by: info_nospam@taospace.com Assigned to: David
Priority: normal Milestone: 1.0
Component: ActiveSupport Version: 0.11.0
Severity: normal Keywords: inflector
Cc:

Description (Last modified by david)

If you have a table called people and you do a ruby script\generate scaffold Person, it generates a controller for "Persons", thus making the URL path something like http://localhost/Persons/new, instead of http://localhost/People/New, which is what you would expect.

The database operations themselves work as expected though, and do use the "people" table.

Attachments

pluralize-capitalized.diff (4.4 kB) - added by bitsweat on 03/25/05 16:21:20.

Change History

03/25/05 16:20:57 changed by bitsweat

  • keywords set to inflector.
  • summary changed from Mapping rules don't work correctly to [PATCH] Inflector incorrectly pluralizes capitalized words.
  • component changed from ActiveRecord to ActiveSupport.
  • milestone set to 1.0.

Inflector.pluralize only handles lowercase words. The patch handles capitalization (but not MiXeD case).

03/25/05 16:21:20 changed by bitsweat

  • attachment pluralize-capitalized.diff added.

03/26/05 13:20:51 changed by david

  • status changed from new to closed.
  • resolution set to fixed.
  • description changed.