Ticket #1047 (closed enhancement: fixed)

Opened 22 months ago

Last modified 22 months ago

generateModelsFromDb + singularization

Reported by: x!sign.dll Owned by: jwage
Priority: minor Milestone: 0.11.0
Component: Behaviors Version: 0.11.0
Severity: Keywords: singular,plural,singularization,inflector
Cc: Has Test:
Status: Has Patch:

Description

When the models are generated from the database, the singularization also applies to 2 letter words such as "cs" or "as", which will never have a plural.

For example:
Tablename: foo_as_bar
generated modelname: FooABar

Patch:
Inflector.php
Line: 135ff.

Old:

#135:                          '/s$/i' => '');

New:

#135:                           '/^(.{2,2})$/i' => '\1',
#136:                          '/s$/i' => '');

- xsign

Change History

Changed 22 months ago by jwage

  • milestone changed from 0.11.2 to 0.11.0

Changed 22 months ago by jwage

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

(In [4378]) fixes #1047

Note: See TracTickets for help on using tickets.