diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 7b23f988c..552f12870 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -35,6 +35,14 @@ class RegistrationsController < Devise::RegistrationsController render "edit" end end + + def destroy + if @member.destroy_with_password(params.require(:member)[:current_password]) + redirect_to root_path + else + render "edit" + end + end end # check if we need the current password to update fields