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: User Registration Redirect Path #1329

Conversation

Gabe-Torres
Copy link
Contributor

🔗 Issue

#1227

✍️ Description

This update utilizes Devise's after_update_path_for method to handle
user redirection after updating their registration.

If the user is part of the adopter or fosterer roster, and associated
with a valid organization they will be redirected to their adopter/fosterer dashboard.

If the user is an admin or super admin, and associated with a valid
organization they will be redirected to their staff dashboard.

If neither condition is met, the user will be redirected to the root path.

Adds: Controller tests for user registration updates:
Test case for adopter/fosterer user redirection.
Test case for staff user redirection.

Adds: update on registration test file to account for new update redirect

📷 Screenshots/Demos

    This update utilizes Devise's after_update_path_for method to handle
    user redirection after updating their registration.

    If the user is part of the adopter or fosterer roster, and associated
    with a valid organization they will be redirected to their adopter/fosterer dashboard.

    If the user is an admin or super admin, and associated with a valid
    organization they will be redirected to their staff dashboard.

    If neither condition is met, the user will be redirected to the root path.

    Adds: Controller tests for user registration updates:
    Test case for adopter/fosterer user redirection.
    Test case for staff user redirection.

    Adds: update on registration test file to account for new update redirect
@Gabe-Torres Gabe-Torres force-pushed the 1227-Edit-User-Registration-Redirect-Path-V2 branch from 66de36d to fbc22ff Compare January 20, 2025 02:56
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.

Nice! @Gabe-Torres

@kasugaijin kasugaijin merged commit 8b8824d into rubyforgood:main Jan 21, 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