-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
before filter for >= 0.10.0 #898
Comments
Very interesting. If anything this is a regression and we should document it in UPGRADING.md - would appreciate a PR. I am honestly not sure what we want here. The Would love to hear what others have to say. |
Sure, I will create a PR. I don't really like using And we use path for versioning, so we can easily switch to namespace/group etc. But I think we should treat version as something similar to namespace. The only difference being that version can be specified in path, header etc. |
I think I agree. Lets treat it as a regression for now that we should be fixing, want to try to do that? |
Sure, I'll give it a shot and keep you posted. Meanwhile I try that, I'll document this behavior and create a PR. Thanks! |
If possible, please release a new version of Grape soon. I'll really appreciate that. Thanks! |
Will do. |
I believe this was fixed by #901, closing. Please reopen @kushkella if I misunderstood something. |
As of 0.9.0 version of gem before filter was only called for the version block within which it was defined. But from 0.10.0 it is being called for all version blocks as long as we don't group them as a resource/group/namespace. e.g.
when using 0.9.0 when I request
GET /foo/1
, the resource will only log "bar". But with 0.10.0 it will log both "foo" and "bar" as long as both version blocks are not individually wrapped inside a blank namespace/resource/group etc.It would be great if you could explain if this is the desired behavior. Thanks!
The text was updated successfully, but these errors were encountered: