-
Notifications
You must be signed in to change notification settings - Fork 6
Redirect fixes for review #2778
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
Merged
Merged
+238
−248
Conversation
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
9c78cd7 to
0800a75
Compare
- Replace session-based approach with param-passing pattern - Add return_to_path helper for consistent redirect logic - Add return_to_param helper for forms to preserve value - Remove store_return_to_report_path before_action calls - Update views to use hidden return_to fields in forms
0800a75 to
4bae4f7
Compare
app/views/planning_applications/assessment/consideration_guidances/_form.html.erb
Show resolved
Hide resolved
...tasks/check-and-assess/assessment-summaries/planning-considerations-and-advice/show.html.erb
Show resolved
Hide resolved
engines/bops_reports/app/helpers/bops_reports/task_path_helper.rb
Outdated
Show resolved
Hide resolved
engines/bops_reports/app/helpers/bops_reports/task_path_helper.rb
Outdated
Show resolved
Hide resolved
...ps_preapps/tasks/check-and-assess/check-application/check-consultees-consulted/show.html.erb
Outdated
Show resolved
Hide resolved
97f50ea to
a9b2645
Compare
engines/bops_reports/app/views/bops_reports/planning_applications/show.html.erb
Outdated
Show resolved
Hide resolved
- Remove ReturnToReport concern in favor of inline params[:return_to] - Update controllers to use params[:return_to].presence || default_path - Change nested form.hidden_field :return_to to hidden_field_tag - Add return_to_or_task_path helper in BopsPreapps for preserving return_to through internal task navigation - Update report edit links to use new task-based layout paths - Add comprehensive test coverage for report-to-task navigation This allows users editing from the pre-application report page to return directly to the report after saving, with proper anchor support for deep-linking to specific sections
a9b2645 to
decd4aa
Compare
benjamineskola
approved these changes
Jan 8, 2026
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.
Description of change
This whole redirect thing is a mess but hopefully these changes make things a bit more consistent (and less worse)...
Refactor return_to parameter handling for report navigation
return_to through internal task navigation
This allows users editing from the pre-application report page to
return directly to the report after saving, with proper anchor
support for deep-linking to specific sections
Story Link
https://trello.com/c/WkkkDqhI/1571-redirects-from-review-to-the-new-assessment-layout