This commit is contained in:
BoHung Chiu 2022-05-11 11:32:10 +08:00
parent 18f31caa2d
commit dc737e3bd2
1 changed files with 4 additions and 2 deletions

View File

@ -8,8 +8,10 @@ module BulletinModel
before_destroy :cache_tag_ids
end
def cache_tag_ids
@tag_ids = self.tag_ids
@org_tag_ids = self.org_tag_ids
if self.class == Bulletin
@tag_ids = self.tag_ids
@org_tag_ids = self.org_tag_ids
end
end
def do_before_save
if self.class == SubPart