Skip to content
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

Add a form object for selecting an address #2739

Merged
merged 1 commit into from
May 14, 2024

Conversation

felixclack
Copy link
Contributor

When the user is adding their home address, we have a hard-coded address
selection form that can be migrated to a form object.

This change allows us to remove the AddressDetails concern from the
controller as the functionality it adds is moved into the form objects.

@felixclack felixclack requested review from slorek, rjlynch and your May 10, 2024 08:34
Copy link

@felixclack felixclack force-pushed the select-home-address-form branch 4 times, most recently from d12baf5 to 704c210 Compare May 10, 2024 09:15
redirect_to claim_path(current_journey_routing_name, "no-address-found") and return
else
# otherwise it takes you to "no-address-found" on the backlink from the slug sequence
@backlink_path = claim_path(current_journey_routing_name, "postcode-search")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this backlink path logic might be missing now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The backlink path is now defined in the form object. Does that fit with where you'd expect to find it?

Copy link
Contributor

Choose a reason for hiding this comment

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

yep! if it's not just a backlink to the previous slug i.e. there's some logic behind it, we override the backlink_path in the base form 👍

@felixclack felixclack force-pushed the select-home-address-form branch 2 times, most recently from b892a23 to eb91264 Compare May 10, 2024 12:11
When the user is adding their home address, we have a hard-coded address
selection form that can be migrated to a form object.

This change allows us to remove the AddressDetails concern from the
controller as the functionality it adds is moved into the form objects.

Also, the rescue block in the show action of the ClaimsController is no
longer called from anywhere and we can safely remove it too.
@felixclack felixclack force-pushed the select-home-address-form branch from 8ce9cbf to a8e345d Compare May 14, 2024 06:27
@felixclack felixclack merged commit 6a62e9e into master May 14, 2024
13 checks passed
@felixclack felixclack deleted the select-home-address-form branch May 14, 2024 07:22
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