Fixes implementation bug when erasing account
This commit is contained in:
@@ -17,8 +17,8 @@ class Users::RegistrationsController < Devise::RegistrationsController
|
|||||||
def delete
|
def delete
|
||||||
# The only difference between this version of delete and the original are the following two lines
|
# The only difference between this version of delete and the original are the following two lines
|
||||||
# (we build the resource differently and we also call erase instead of destroy)
|
# (we build the resource differently and we also call erase instead of destroy)
|
||||||
build_resource(erase_params)
|
resource = current_user
|
||||||
resource.erase(params[:erase_reason])
|
current_user.erase(erase_params[:erase_reason])
|
||||||
|
|
||||||
yield resource if block_given?
|
yield resource if block_given?
|
||||||
Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)
|
Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user