@ -686,10 +686,12 @@ class Attachment < ActiveRecord::Base
#更新时间
def update_others
if self.course
if self.course.is_a?(::Course)
self.course.update_course
end
# Delete the previous articles index in Elasticsearch
# Attachment.__elasticsearch__.client.indices.delete index: Attachment.index_name rescue nil