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

Update Redirect Behavior Based on Success of Pet Creation #1342

Merged

Conversation

cassieemb
Copy link
Contributor

@cassieemb cassieemb commented Jan 22, 2025

🔗 Issue

references #1335

✍️ Description

Currently, when a staff creates a pet, the redirect behavior is as follows:

Successful Creation -> Redirect to Index
Unsuccessful Creation -> Redirect to New

However, this is not the behavior that we want. Instead, the redirect behavior should be as follows:

Successful Creation -> Redirect to Show for Newly Created Pet
Unsuccessful Creation -> Redirect to Index and Flash Error

I did not add controller tests for this change as advised in the ticket, but I am happy to do so if it would be beneficial!

📷 Screenshots/Demos

https://cassie.neetorecord.com/watch/072465a0442f283a16d7

redirect to show when pet creation is successful and redirect to index when pet creation is unsuccessful
@cassieemb cassieemb requested a review from kasugaijin January 22, 2025 23:51
Copy link
Collaborator

@kasugaijin kasugaijin left a comment

Choose a reason for hiding this comment

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

Looks good!

@kasugaijin kasugaijin merged commit d9b63fc into rubyforgood:main Jan 23, 2025
5 checks passed
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.

2 participants