Skip to content

Conversation

hodak
Copy link
Contributor

@hodak hodak commented Apr 26, 2015

Hi,

so I had an issue #965 After investigating it all, it seemed like it was very unexpected behavior:

format :json
get '/users' => { status: 200, content_type: 'application/json' }
get '/users.json' => { status: 404 }

introduced with PR #809

It turned out it was strictly related to the issue I was having. I think it's logical to allow calling endpoint with specified format.

I saw @dblock comments about changing this (1, 2) so I decided to do this.

I've also added specs with the specific issue I was having with deeply nesting concerns.

Best

CHANGELOG.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs - [@hodak](...) like all the lines above, please.

@dblock
Copy link
Member

dblock commented Apr 27, 2015

As we're undoing behavior introduced in a prior version this also needs an UPGRADING note, please.

@dblock
Copy link
Member

dblock commented Apr 27, 2015

Thanks for doing this @hodak, needs some minor updates, see above. Please squash your commits too.

Both should work:
format :json
* /users
* /users.json
@hodak
Copy link
Contributor Author

hodak commented Apr 27, 2015

Done & done, thanks! ;)

@dblock
Copy link
Member

dblock commented Apr 27, 2015

Merging. I will add some notes on the regression.

dblock added a commit that referenced this pull request Apr 27, 2015
…e-965

Use proper .format suffix if you have one path, issue 965
@dblock dblock merged commit d31918e into ruby-grape:master Apr 27, 2015
dblock added a commit that referenced this pull request Apr 27, 2015
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