mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
Add ability to delete Maybe account (#698)
* Build out user deactivation and purging workflows * Add i18n translations for user deletion * Add tests for user deletion * Fix lint issue
This commit is contained in:
parent
55cb1ae5bd
commit
19ee773d9b
15 changed files with 128 additions and 8 deletions
|
@ -17,6 +17,15 @@ class Settings::ProfilesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
if Current.user.deactivate
|
||||
logout
|
||||
redirect_to root_path, notice: t(".success")
|
||||
else
|
||||
redirect_to settings_profile_path, alert: Current.user.errors.full_messages.to_sentence
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def user_params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue