|
|
|
@ -142,8 +142,6 @@ class UsersController < ApplicationController |
|
|
|
|
def update |
|
|
|
|
@user.admin = params[:user][:admin] if params[:user][:admin] |
|
|
|
|
@user.login = params[:user][:login] if params[:user][:login] |
|
|
|
|
# require 'pry'; binding.pry |
|
|
|
|
|
|
|
|
|
@user.attributes = permitted_params.user_update_as_admin |
|
|
|
|
if params[:user][:password].present? && @user.change_password_allowed? |
|
|
|
|
@user.password, @user.password_confirmation = params[:user][:password], params[:user][:password_confirmation] |
|
|
|
|