Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crud generators ending with 's' blow up #3

Open
NeilBryant opened this issue Apr 7, 2013 · 2 comments
Open

crud generators ending with 's' blow up #3

NeilBryant opened this issue Apr 7, 2013 · 2 comments

Comments

@NeilBryant
Copy link

compound generate crud status

fs.js:338
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory '/data/home/nbryant/src/nodeapps/compound/cv/app/views/status/_form.ejs'

The controller is named incorrectly (singular statu_controller, rather than plural) and internally refers to 'statu'. Model is correct.

If I pluralize the command (compound g crud statuses), the controller, handler, etc all look correct, and only the model file is wrong (plural filename, plural object internally)... but there is only the one file to fix.

I took a stab at finding the problem, but didn't really get anywhere in the time I have. I see vendor/inflection.js and the rules look OK, but I'm not certain... are the first regexes stripping off 's' at the end of a word?

I've tried this with several other nouns: octopus, alias, bus, and all fail when scaffolded in the singular. Nouns not ending in 's' (ox, person, matrix) all work as expected.

@paurosello
Copy link

I had exactly the same problem scaffolding 'provincia', it generates "Provincium", don't know why but it doesn't work.

500 ReferenceError: Provincium is not defined in provincia controller during "index" action

@leandono
Copy link

leandono commented Jul 8, 2013

Same problem here... any notice why this happend?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants