-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
[#7784] Update request URLs use url_title
#7984
Merged
Merged
Conversation
This file contains 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
alexander-griffen
force-pushed
the
7784-url-request-id-permutations
branch
from
November 3, 2023 10:48
afe49e5
to
e8e4929
Compare
alexander-griffen
force-pushed
the
7784-url-request-id-permutations
branch
from
November 20, 2023 13:30
3d5b5ae
to
49f3d4c
Compare
alexander-griffen
force-pushed
the
7784-url-request-id-permutations
branch
from
November 27, 2023 15:50
6749e51
to
914ef41
Compare
gbp
force-pushed
the
7784-url-request-id-permutations
branch
from
November 27, 2023 17:06
914ef41
to
b79ed05
Compare
gbp
force-pushed
the
7784-url-request-id-permutations
branch
from
December 7, 2023 12:15
b79ed05
to
2e32f1e
Compare
gbp
changed the title
WIP: URL paths stopping using request IDs
[#7784] Update request URLs use Dec 7, 2023
url_title
gbp
force-pushed
the
7784-url-request-id-permutations
branch
3 times, most recently
from
December 7, 2023 15:16
8890dc3
to
f8ba21a
Compare
alexander-griffen
force-pushed
the
7784-url-request-id-permutations
branch
from
December 18, 2023 16:06
767b4db
to
f8ba21a
Compare
Switch to using request URL title paths to save extra redirects.
Remove the need to specify `url_title` in the params hash. Rails will already correctly generate the correct route without this. Removing means more consistency, shorter line lengths, and will be more flexible if the route ever changes.
Remove the need to specify `request_id` in the params hash. Rails will already correctly generate the correct route without this. Removing means more consistency, shorter line lengths, and will be more flexible when the route changes to use request URL title.
Remove the need to specify `id` in the params hash. Rails will already correctly generate the correct route without this. Removing means more consistency, shorter line lengths, and will be more flexible when the route changes to use request URL title.
Remove the need to specify `request_id` in the params hash. Rails will already correctly generate the correct route without this. Removing means more consistency, shorter line lengths, and will be more flexible when the route changes to use request URL title.
Now we can a redirects routing file with similar redirects we can move the before action callback which redirects request numerical IDs to the more friendly URL titles.
Fix pre-existing linting issues with code lines which will be changing. Fixes: - line length - indentation - leading periods
Replace request IDs in URLs with titles
Replace request IDs in URLs with titles This does remove a few tests that were looking specifically at IDs, or 'ugly' IDs)
Replace request IDs in URLs with titles
gbp
force-pushed
the
7784-url-request-id-permutations
branch
from
January 8, 2024 12:40
6405f7a
to
dcca4ed
Compare
gbp
approved these changes
Jan 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this thoroughly both locally and on staging.
gbp
added a commit
to mysociety/whatdotheyknow-theme
that referenced
this pull request
Jan 9, 2024
Broken since mysociety/alaveteli#7984
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.
Relevant issue(s)
Fixes #7784
What does this do?
This changes instances of
id
in URLs tourl_title
Why was this needed?
This was needed to reduce possible URL permutations, to make admin tasks easier.
Notes to reviewer
Commits b56786b...6b07a03 are refactoring to allow the change to be made in the other commits.