From 194f8ff3d3ced2be5f382cb2448355b0aae9cf82 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 27 Dec 2019 18:13:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=B7=B5=E8=AF=BE=E7=A8=8B=E4=B8=AD?= =?UTF-8?q?=E7=9A=84jupyter=E5=AE=9E=E8=AE=AD=E4=B8=8D=E8=83=BD=E9=80=89?= =?UTF-8?q?=E7=94=A8=E5=88=B0=E8=AF=BE=E5=A0=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course.rb | 1 - app/models/shixun.rb | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/course.rb b/app/models/course.rb index b3e62bb99..2f561bba7 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -92,7 +92,6 @@ class Course < ApplicationRecord where("name LIKE ?", "%#{keywords.split(" ").join('|')}%") unless keywords.blank? } scope :started, -> { where("start_date is null or start_date <= '#{Date.today}'") } - scope :no_jupyter, -> { where(is_jupyter: false) } # acts_as_taggable diff --git a/app/models/shixun.rb b/app/models/shixun.rb index 9522c54da..d8a41ba6a 100644 --- a/app/models/shixun.rb +++ b/app/models/shixun.rb @@ -83,6 +83,7 @@ class Shixun < ApplicationRecord scope :publiced, lambda{ where(public: 2) } scope :field_for_recommend, lambda{ select([:id, :name, :identifier, :myshixuns_count]) } scope :find_by_ids,lambda{|k| where(id:k)} + scope :no_jupyter, -> { where(is_jupyter: false) } after_create :send_tiding #同步到trustie