From 78bbd8cd69023f8c1972afc9d8f42d446932a261 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 12 Sep 2019 14:47:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/shixun_search_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/shixun_search_service.rb b/app/services/shixun_search_service.rb index 0ca7a0146..820919dd1 100644 --- a/app/services/shixun_search_service.rb +++ b/app/services/shixun_search_service.rb @@ -20,7 +20,7 @@ class ShixunSearchService < ApplicationService if User.current.admin? || User.current.business? @shixuns = Shixun.none_closed.where(hidden: 0) else - none_shixun_ids = ShixunSchool.where("school_id != #{current_user.school_id}").pluck(:shixun_id) + none_shixun_ids = ShixunSchool.where("school_id != #{User.current.school_id}").pluck(:shixun_id) @shixuns = Shixun.where.not(id: none_shixun_ids).none_closed.where(hidden: 0) end