fix: observed user can not correct find

This commit is contained in:
yystopf 2021-08-26 18:36:54 +08:00
parent 7d26fba3c0
commit ccd477e519
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ class Users::BaseController < ApplicationController
helper_method :observed_logged_user?, :observed_user
def observed_user
@_observed_user ||= (User.find_by_id(params[:user_id]) || User.find_by_login(params[:user_id]))
@_observed_user ||= (User.find_by_login(params[:user_id]) || User.find_by_id(params[:user_id]))
end
def observed_logged_user?