fix error
This commit is contained in:
parent
21bb599442
commit
409fb22fd2
|
@ -9,7 +9,7 @@ class Bulletin
|
|||
include OrbitCategory::Categorizable
|
||||
include Slug
|
||||
require 'bulletin_model/cache'
|
||||
include ::BulletinModel::Cache
|
||||
include BulletinModel::Cache
|
||||
attr_accessor :org_tag_ids
|
||||
def tags=(ids)
|
||||
self.org_tag_ids = self.tag_ids
|
||||
|
|
|
@ -3,12 +3,12 @@ module BulletinModel
|
|||
require 'active_support/concern'
|
||||
extend ActiveSupport::Concern
|
||||
included do
|
||||
before_save :do_before_save
|
||||
before_destroy :do_before_save
|
||||
after_save :do_before_save
|
||||
after_destroy :do_before_save
|
||||
end
|
||||
def do_before_save
|
||||
if self.class == SubPart
|
||||
AnnsCache.where(parent_id:self.id).destroy
|
||||
AnnsCache.where(parent_id: self.id).destroy
|
||||
elsif self.class == Bulletin || (self.class == Page && self.module == "announcement")
|
||||
if self.class == Bulletin
|
||||
tmp_tag_ids = (Array(self.tag_ids) + Array(self.org_tag_ids)).uniq
|
||||
|
|
Loading…
Reference in New Issue