实训的搜索

dev_jupyter
cxt 5 years ago
parent a4964802a3
commit 7dfb5076c7

@ -26,7 +26,7 @@ class ShixunSearchService < ApplicationService
shixun_ids = ShixunSchool.where(school_id: User.current.school_id).pluck(:shixun_id)
shixun_ids = shixun_ids.reject(&:blank?).length == 0 ? -1 : shixun_ids.join(",")
@shixuns = @shixuns.where("use_scope = 1 or id in (#{shixun_ids})").unhidden.published.or(@shixuns.where(id: User.current.shixuns))
@shixuns = @shixuns.where("use_scope = 0 or id in (#{shixun_ids})").unhidden.published.or(@shixuns.where(id: User.current.shixuns))
end
end

Loading…
Cancel
Save