Fix bug where param handlers were run out of order #282
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #237 by adjusting the way that param handlers are injected into the stack. Currently, the params handlers are added in the order in which you defined them, rather than the order they are defined in the URL.
I've added a few tests cases here to demonstrate the problem, as well as made the necessary changes to fix it. (all other tests are still passing)
Apologies for the weird PR, I actually started on this fix a couple of months ago, but then got sidetracked after a solution didn't come to mind easily. I picked it up again yesterday, and finally came up with something elegant. :)