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

404 Api Version Not Found when version given as a symbol #328

Closed
jagregory opened this issue Jan 30, 2013 · 3 comments
Closed

404 Api Version Not Found when version given as a symbol #328

jagregory opened this issue Jan 30, 2013 · 3 comments

Comments

@jagregory
Copy link

When I specify the version as a symbol, Grape doesn't ever seem to detect the right version.

I'm on the latest master commit 371921f.

To reproduce:

class Api::V1 < Grape::API
  version :v1
  format :txt

  resource :hello do
    get do
      'hello'
    end
  end
end

GET /v1/hello yields the 404 API Version Not Found txt response. Changing version :v1 to version 'v1' fixes the issue.

This is obviously not a big issue, but it did catch me out for a while and it is inconsistent with the other methods (resource for example is happy to take symbols).

@nihonjinrxs
Copy link

Agreed, would be nice to be consistent. Tripped me up for a bit too.

@dblock
Copy link
Member

dblock commented Feb 3, 2013

Looks like many interested parties, can someone write a spec that reproduces this, please, within Grape?

@dblock dblock closed this as completed in 354439a Feb 9, 2013
@dblock
Copy link
Member

dblock commented Feb 9, 2013

Fixed in 354439a, please give it a try.

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

3 participants