Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_cs
杨树明 5 years ago
commit f40b3cfe08

@ -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

Loading…
Cancel
Save