Upgraded Ruby to 2.7.0-preview1 and Rails to 6.0.0 - fixed 1 spec
This commit is contained in:
@@ -34,7 +34,7 @@ class AdminController < ApplicationController
|
||||
def update_user
|
||||
user = User.find_by_id(params[:admin_id])
|
||||
if user
|
||||
user.update_attributes(params[:user].reject { |k| k == ("password" || "password_confirmation") })
|
||||
user.update(params[:user].reject { |k| k == ("password" || "password_confirmation") })
|
||||
pass = params[:user][:password]
|
||||
user.password = pass if !(pass.blank?)
|
||||
user.save!
|
||||
|
||||
@@ -29,7 +29,7 @@ class UsersController < ApplicationController
|
||||
user = User.where("id = '#{params[:user][:id]}'")[0]
|
||||
|
||||
if user
|
||||
user.update_attributes(user_params_without_password)
|
||||
user.update(user_params_without_password)
|
||||
if params[:user][:password].present? && (params[:user][:password] == params[:user][:password_confirmation])
|
||||
user.password = params[:user][:password]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user