1602/compound — pull request #504 by NeilBryant (2013-04-07 20:07:58+00:00)
Title: CRUD fails on nouns ending with 's'

Nouns like 'status', 'alias', 'bus', 'octopus' cause an error, and scaffolding fails. It *looks* like things get passed back and forth a bit, and these words get treated as plurals, and things eventually fall apart

I've modified the regexps to provide a shortcut for words that are already what they should be.

Eg, 'status' didn't have a match in singular, so it would continue until it hit the most generic case, and get 'singularized' as 'statu'. This causes a cascading error. Modifying the regex to match 'status' *or* 'statuses' provides a shortcut test.

This isn't a fix so much as a kludge. It would be better to be able to specify a '-plural statuses' or similar to the scaffolding command line, and just let a user override any wonkiness.

Side effect of this is that creating a scaffold with a plural name (compound g mice) generates the proper singular forms of everything apart from the model/scheme. Controllers, etc, all match a properly created controller. Not that I think that's important.

I've tested all the mentioned nouns, and a range of others. I'm not likely to have a table full of octopi, any time soon, but more general things like 'status' and 'alias' work fine with this change.