mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Add users management to site settings (#126)
This commit is contained in:
committed by
GitHub
parent
bc15140512
commit
37fb99a868
11
app/controllers/registrations_controller.rb
Normal file
11
app/controllers/registrations_controller.rb
Normal 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
|
||||
Reference in New Issue
Block a user