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

Prefix doesn't carry down to resource #867

Closed
dblock opened this issue Dec 25, 2014 · 2 comments
Closed

Prefix doesn't carry down to resource #867

dblock opened this issue Dec 25, 2014 · 2 comments

Comments

@dblock
Copy link
Member

dblock commented Dec 25, 2014

This seems to be an issue again.

With 0.10.0, seems prefix is not being respected on base paths using resource

this is not working

class Users < Grape::API
  prefix "api"
  resource :users do
    get do
      @users = { users: User.all }
    end

this works, but has to be done for each endpoint base segment =(

class Users < Grape::API
  resource :users do
    prefix "api"
    get do
      @users = { users: User.all }
    end
@yesmeck
Copy link
Contributor

yesmeck commented Dec 26, 2014

I believe this bug is also caused by this line f8596829#diff-8e15cddb80f42ca7d43872846d80ecbeR102 , I have wrote a spec for this issue in this PR #868 .

@dblock
Copy link
Member Author

dblock commented Dec 28, 2014

Fixed in 0c0e85f.

@dblock dblock closed this as completed Dec 28, 2014
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