Skip to content

Definitive fix for deleting org that is current_org #432

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 2 commits into from
Oct 19, 2018

Conversation

markets
Copy link
Collaborator

@markets markets commented Sep 20, 2018

As well noted by @sseerrggii here: #368 (comment), my first attempt in 14fe6bc doesn't really do the thing 😄

@@ -32,8 +32,7 @@ def destroy
resource.destroy

if resource == current_organization
sign_out(current_user)
redirect_to root_path
sign_out_and_redirect(current_user)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this some kind of helper of our own or am I still discovering Rails features?

Copy link
Collaborator Author

@markets markets Oct 2, 2018

Choose a reason for hiding this comment

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

@enricostano
Copy link
Contributor

Rebased (via merge) and deployed to staging.

@sseerrggii
Copy link
Contributor

Tested!! 👍

@enricostano enricostano merged commit 54a1701 into develop Oct 19, 2018
@enricostano enricostano deleted the fix_org_destroy_within_current_organization branch October 19, 2018 08:20
@enricostano enricostano mentioned this pull request Oct 19, 2018
@markets markets mentioned this pull request Jan 3, 2019
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.

4 participants