Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2353 (closed defect: migrated)

Opened 10 years ago

Last modified 8 years ago

CrudRestController does not respect plurals when creating urls.

Reported by: percious Owned by: percious
Priority: normal Milestone: 2.1
Component: TurboGears Version: 2.1
Severity: minor Keywords:
Cc:

Description (last modified by percious) (diff)

For instance:

class CompanyController(CrudRestController):
    class = Company

the json url for this will become companys.json

it should be: companies.json

Or:

class OctopusController(CrudRestController):
   class = Octopus

the json url for this would become: octopuss.json the url _should_ be: ocotopi.json

Enjoy!

Change History

comment:1 Changed 10 years ago by percious

  • Description modified (diff)

comment:2 follow-up: ↓ 3 Changed 10 years ago by dfalk

While 'companys.json' seems definitely wrong, attempting the wide range of pluralizations seems somewhat wasteful. What if no pluralization were attempted, and it just became company.json? Is that satisfactory?

comment:3 in reply to: ↑ 2 Changed 9 years ago by alekibango

Replying to dfalk:

While 'companys.json' seems definitely wrong, attempting the wide range of pluralizations seems somewhat wasteful. What if no pluralization were attempted, and it just became company.json? Is that satisfactory?

+1, Yes. Or using some whole word as postfix/prefix -- instead of using just 1 letter.

comment:4 Changed 8 years ago by pedersen

  • Status changed from new to closed
  • Resolution set to migrated
Note: See TracTickets for help on using tickets.