intridea/grape — Issue #133: Header version ignored
Author: pduersteler
Created: 2012-02-02 21:29:58+00:00
State: open

This may be similiar to #124 and #74

According to several slides and docs and wiki pages, I tried this:

```ruby
version 'v2', :using => :header, :strict => true, :vendor => 'test'

resource :test do
get :first do
"v2"
end
end

version 'v1', :using => :header, :strict => true, :vendor => 'test'

resource :test do
get :first do
"v1"
end
end
```

curl -H Accept=application/vnd.test-v1+json http://test.localhost.example:3000/api/test/first
curl -H Accept=application/vnd.test-v2+json http://test.localhost.example:3000/api/test/first

The requests above always returns "v2" regardless of the header being set. I also tested those without using the `strict` param, but got the same results.