diff options
author | Stan Hu <stanhu@gmail.com> | 2017-04-01 07:29:51 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-04-02 15:37:05 +0300 |
commit | 6a2d022d1d578f8957736de2fb895069c24c072b (patch) | |
tree | 206166bcce0e3256b7d8151e5b9172fc01ae4e5a /app/controllers/registrations_controller.rb | |
parent | 8a71d40e60c799f969af0ed255e931b6c9907634 (diff) |
Delete users asynchronously
Diffstat (limited to 'app/controllers/registrations_controller.rb')
-rw-r--r-- | app/controllers/registrations_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index a49a1f50a81..8109427a45f 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -25,12 +25,12 @@ class RegistrationsController < Devise::RegistrationsController end def destroy - Users::DestroyService.new(current_user).execute(current_user) + DeleteUserWorker.perform_async(current_user.id, current_user.id) respond_to do |format| format.html do session.try(:destroy) - redirect_to new_user_session_path, notice: "Account successfully removed." + redirect_to new_user_session_path, notice: "Account scheduled for removal." end end end |