@ -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
@ -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)}
after_create :send_tiding
#同步到trustie