fix error
This commit is contained in:
parent
df3f0a70a4
commit
d6593427f3
|
@ -19,6 +19,7 @@ class Admin::AnnouncementsController < OrbitAdminController
|
||||||
ids.each_with_index do |id,i|
|
ids.each_with_index do |id,i|
|
||||||
Bulletin.where(id: id).update(sort_number: i)
|
Bulletin.where(id: id).update(sort_number: i)
|
||||||
end
|
end
|
||||||
|
AnnsCache.all.delete
|
||||||
edit_sort
|
edit_sort
|
||||||
render 'update_sort',layout: false
|
render 'update_sort',layout: false
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ module BulletinModel
|
||||||
end
|
end
|
||||||
def do_before_save
|
def do_before_save
|
||||||
if self.class == SubPart
|
if self.class == SubPart
|
||||||
AnnsCache.where(parent_id: self.id).destroy
|
AnnsCache.where(parent_id: self.id).delete
|
||||||
elsif self.class == Bulletin || (self.class == Page && self.module == "announcement")
|
elsif self.class == Bulletin || (self.class == Page && self.module == "announcement")
|
||||||
if self.class == Bulletin
|
if self.class == Bulletin
|
||||||
tmp_tag_ids = (Array(self.tag_ids) + Array(self.org_tag_ids)).uniq
|
tmp_tag_ids = (Array(self.tag_ids) + Array(self.org_tag_ids)).uniq
|
||||||
|
@ -19,7 +19,7 @@ module BulletinModel
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
AnnsCache.all.destroy
|
AnnsCache.all.delete
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue