fix error

This commit is contained in:
chiu 2020-04-10 10:13:23 +08:00
parent c939216c6d
commit 6851cc868b
2 changed files with 4 additions and 2 deletions

View File

@ -77,7 +77,7 @@ module AnnouncementsHelper
if feeds.count > 0
temp_ids = []
data = feeds.collect do |feed|
feed.all_contents_for_feed(site_source,locale)
feed.all_contents_for_feed(site_source,locale,type=='widget')
end.flatten.compact
else
data = []

View File

@ -11,7 +11,9 @@ class Bulletin
require 'bulletin_model/cache'
include BulletinModel::Cache
SubPart.class_eval { include BulletinModel::Cache }
before_destroy do
AnnsCache.all.destroy
end
field :title, type: String, localize: true
field :subtitle, localize: true
field :text, localize: true