Add description field to administrator users like evaluators description
This commit is contained in:
@@ -28,4 +28,22 @@ class Admin::AdministratorsController < Admin::BaseController
|
||||
|
||||
redirect_to admin_administrators_path
|
||||
end
|
||||
|
||||
def edit
|
||||
end
|
||||
|
||||
def update
|
||||
if @administrator.update(update_administrator_params)
|
||||
notice = t("admin.administrators.form.updated")
|
||||
redirect_to admin_administrators_path, notice: notice
|
||||
else
|
||||
render :edit
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def update_administrator_params
|
||||
params.require(:administrator).permit(:description)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user