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

Use camelize rather than classify when supplying a namespace #2117

Merged
merged 1 commit into from
Jan 27, 2022

Conversation

edwinwills
Copy link
Contributor

classify will singularise a namespace, and that feels like unintended behaviour. E.g. if I use --namespace=operations, with classify, the generated module name is Operation, but I would expect this to be Operations.

Swapping classify for camelize solves this issue for me, but this may not be what you intended with this, so no problem if this isn't relevant.

Thanks for a great gem!

`classify` will singularise a namespace, that feels like unintended behaviour. E.g. if I use `--namespace=operations`, with `classify`, the generated module name is `Operation`, but I would expect this to be `Operations`.

Swapping `classify` for `camelize` solves this issue.
@pablobm
Copy link
Collaborator

pablobm commented Jan 27, 2022

I think you are right :-) Thank you

@pablobm pablobm merged commit 45199a6 into thoughtbot:main Jan 27, 2022
@edwinwills edwinwills deleted the classify-camelize-namespace branch March 24, 2022 11:33
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

Successfully merging this pull request may close these issues.

2 participants