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

Change default jsonapi_namespace_separator to -- #2062

Closed
westoque opened this issue Feb 22, 2017 · 1 comment
Closed

Change default jsonapi_namespace_separator to -- #2062

westoque opened this issue Feb 22, 2017 · 1 comment

Comments

@westoque
Copy link

westoque commented Feb 22, 2017

Currently, the default has been to dasherize the namespaced model. For example Admin::User to admin-user. This is bad because the default and standard behavior for camel casing and dasherizing models was from a structure that looks like MyCamelCase to my-camel-case.

So if you read the namespaced model admin-user, from the looks of it, you are expecting AdminUser but in reality, is just a namespace. It would be better written admin--user by default.

@bf4
Copy link
Member

bf4 commented Feb 22, 2017

@westoque yes, we actually recommend this in our docs https://github.com/rails-api/active_model_serializers/blob/v0.10.4/docs/general/configuration_options.md#jsonapi_namespace_separator

Changing it, however, is a breaking change, so will have to wait for a major version :(

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

No branches or pull requests

2 participants