Skip to content

Conversation

@pixeltrix
Copy link
Member

All the redirect_to/return_to handling was becoming unmanageable.

@pixeltrix pixeltrix force-pushed the add-preapps-validation-requests-controller branch from 3370920 to 118e396 Compare December 19, 2025 06:17
Copy link
Member Author

@pixeltrix pixeltrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just for 'other change' validation requests - will add others later today.


def set_planning_application
scope = current_local_authority.planning_applications
planning_application = scope.find_by!(reference: params[:reference])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to fix everywhere else we're doing the following:

PlanningApplication.find_by(reference: params[:reference])

Because that reference is not globally unique - needs to be scoped to the local authority.

<% else %>
<p>Applicant has not responded yet</p>
<% end %>
</div>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently this block is hidden unless the planning application is in an invalidated state - seems like you'd want to see the applicant response even after the application has been validated so I've removed the condition.

All the redirect_to/return_to handling was becoming unmanageable.
@pixeltrix pixeltrix force-pushed the add-preapps-validation-requests-controller branch from 118e396 to 96ae49b Compare December 19, 2025 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants