Permit password creation
All checks were successful
CI / scan_ruby (push) Successful in 16s
CI / scan_js (push) Successful in 12s
CI / lint (push) Successful in 13s
CI / test (push) Successful in 38s

This commit is contained in:
sto
2025-12-10 17:50:07 +01:00
parent 5345e419df
commit 360157e0c8

View File

@@ -20,7 +20,7 @@ class UsersController < ApplicationController
authorize @user
@user.password_change_attempt = false
if @user.update(user_params)
if @user.update(user_general_params)
redirect_to contests_path, notice: t("users.edit.notice")
else
render :edit, status: :unprocessable_entity
@@ -102,6 +102,10 @@ class UsersController < ApplicationController
end
def user_params
params.expect(user: [ :username, :email_address, :lang, :password ])
end
def user_general_params
params.expect(user: [ :username, :email_address, :lang ])
end