Keep around the current filter in query parameter for Discarding failed jobs#272
Merged
rosa merged 2 commits intorails:mainfrom Jul 11, 2025
TimeTravelerFromNow:button-with-params
Merged
Keep around the current filter in query parameter for Discarding failed jobs#272rosa merged 2 commits intorails:mainfrom TimeTravelerFromNow:button-with-params
rosa merged 2 commits intorails:mainfrom
TimeTravelerFromNow:button-with-params
Conversation
Continue submitting params in the Discard and Retry buttons so that the next request keeps filter
Member
|
I changed this a bit to include only the job filters and not all params in the URL, and to also preserve the params in the redirects. Nice work, and thank you! |
Only those, not all params, which include controller, actions, etc.
Contributor
Author
|
@rosa good work, thanks for revisiting this one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Solves #161 by adding the current parameters to the discard button
Alternative to turbo stream solution proposed in #270
Solution
Add the current parameters to the discard button path, with
params: params.permit!Continue submitting params in the Discard and Retry buttons so that the next request keeps filter
Steps to test
Thoughts on this approach
After discussing some possible drawbacks of turbo for Discarding jobs in the view:
I've come to the conclusion that for solving the issue of the filter persisting keep the params with the Discard button submission.
The hard refresh on redirect comes with the benefit of