setting-for-account-deletable (#3852)

This commit is contained in:
masarakki authored and Eugen Rochko committed 2017-06-19 15:12:31 +02:00
1 parent 500e28442f
commit ff142eb64d
5 files changed
+28 -3

No files matched your search

@@ -3,6 +3,7 @@
class Settings::DeletesController < ApplicationController
layout 'admin'
before_action :check_enabled_deletion
before_action :authenticate_user!
def show
@@ -21,6 +22,10 @@ class Settings::DeletesController < ApplicationController
private
def check_enabled_deletion
redirect_to root_path unless Setting.open_deletion
end
def delete_params
params.require(:form_delete_confirmation).permit(:password)
end