Middleware can be inserted before or after defaults#1393
Middleware can be inserted before or after defaults#1393dblock merged 1 commit intoruby-grape:masterfrom
Conversation
a72b8ec to
24024d2
Compare
|
|
||
| #### Features | ||
|
|
||
| * [#1393](https://github.com/ruby-grape/grape/pull/1393): Middleware can be inserted before or after default Grape middleware - [@ridiculous](https://github.com/ridiculous). |
There was a problem hiding this comment.
I think the CHANGELOG entry below covers this functionality, I would just add , [#1393] to it. No big deal.
|
Very nice, merged. |
|
Nice :) Although with only #1390 you could position your middleware around the default middleware, for example with: Just out of curiosity, what was the use case not considered? |
|
Sorry @rosa I think I don't understand the question :) |
|
@rosa It let's you reference middleware added after https://github.com/ruby-grape/grape/pull/1393/files#diff-8e15cddb80f42ca7d43872846d80ecbeR263, which is pretty much just the formatter and versioner |
|
Ah, got it! I was using my changes just to insert a middleware before |
Builds onto the new middleware stack introduced in #1390. This is useful because it allows positioning of middleware around default Grape middleware.