From 6ea67b6771788cfea48ae5aafe5e9e7df7ec747c Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 26 Dec 2019 17:25:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E5=A0=82=E4=B8=8D=E8=83=BD=E9=80=89?= =?UTF-8?q?=E7=94=A8jupter=E5=AE=9E=E8=AE=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/shixun_search_service.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/services/shixun_search_service.rb b/app/services/shixun_search_service.rb index 248d7d176..32488a7c3 100644 --- a/app/services/shixun_search_service.rb +++ b/app/services/shixun_search_service.rb @@ -33,6 +33,10 @@ class ShixunSearchService < ApplicationService @shixuns = status == "published" ? @shixuns.where(status: 2) : @shixuns.where(status: [0, 1]) end + if params[:no_jupyter] + @shixuns = @shixuns.where(is_jupyter: 0) + end + ## 筛选 难度 if params[:diff].present? && params[:diff].to_i != 0 @shixuns = @shixuns.where(trainee: params[:diff])