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 underscore when appending controller to the default controller string #613

Merged
merged 1 commit into from
Apr 27, 2018
Merged

Use underscore when appending controller to the default controller string #613

merged 1 commit into from
Apr 27, 2018

Conversation

kevinmarx
Copy link
Contributor

The current implementation causes namespaced controllers to fail when using the api! dsl method. This is due to route.defaults[:controller] being 'api/resource' which then when Controller is added and camelize called will result in Api::Resourcecontroller instead of Api::ResourceController. By appending controller using snake case first results in _controller being properly camelized.

string. calling camelize on a namespaced controller will result in
Api::Mycontroller instead of Api::MyController
@iNecas
Copy link
Member

iNecas commented Apr 27, 2018

Makes sense. Thanks @kevinmarx for the patch!

@iNecas iNecas merged commit ec5dc27 into Apipie:master Apr 27, 2018
@iNecas
Copy link
Member

iNecas commented Apr 27, 2018

apipie-rails-0.5.8 with this change has just been released

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