Add users management to site settings (#126)

This commit is contained in:
Riccardo Graziosi
2022-06-24 14:39:35 +02:00
committed by GitHub
parent bc15140512
commit 37fb99a868
71 changed files with 1093 additions and 1409 deletions

View File

@@ -0,0 +1,11 @@
class RegistrationsController < Devise::RegistrationsController
# Override destroy to soft delete
def destroy
resource.status = "deleted"
resource.save
Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)
set_flash_message :notice, :destroyed
yield resource if block_given?
respond_with_navigational(resource){ redirect_to after_sign_out_path_for(resource_name) }
end
end