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