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

Grape::API.routes does not work with mounted Grape::API apps. #300

Merged
merged 3 commits into from
Dec 28, 2012

Conversation

aiwilliams
Copy link
Contributor

This very simple spec shows that the expected number of routes is incorrect. I can enhance these specs further, but I want to get a dialog started before I do too much work. I see that an Grape::Endpoint is added when mount is invoked. That endpoint is then asked for it's routes, but this does not work when the endpoint represents an Grape::API.

My question: Should the Grape::Endpoint#routes method understand this issue and answer the Grape::API.routes from the options[:app]?

@dblock
Copy link
Member

dblock commented Dec 27, 2012

You got it. This is clearly a bug and yes, routes should work everywhere. Would love a fix.

@aiwilliams
Copy link
Contributor Author

@dblock How does this look? Seems to do the trick!

@dblock
Copy link
Member

dblock commented Dec 28, 2012

Good. I think we can do some minor refactoring on this endpoints? vs. endpoints situation, but I will play with it later. Can you please update CHANGELOG and I'll merge it?

@dblock dblock merged commit cdcb95e into ruby-grape:master Dec 28, 2012
@dblock
Copy link
Member

dblock commented Dec 28, 2012

Merged with a minor update, please double-check after me: 0f3f14d

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.

None yet

2 participants