forgeplus/app/controllers/users/base_account_controller.rb

9 lines
228 B
Ruby
Raw Permalink Normal View History

2021-11-22 13:15:45 +08:00
class Users::BaseAccountController < Users::BaseController
before_action :require_login
def observed_user
@_observed_user ||= (User.find_by_id(params[:account_id]) || User.find_by_login(params[:account_id]))
end
end