fix error
This commit is contained in:
parent
12a52c2b8c
commit
54f16a493e
|
@ -15,7 +15,7 @@ class SiteFeedAnnc
|
||||||
I18n.available_locales.each do |locale|
|
I18n.available_locales.each do |locale|
|
||||||
index({ "all_contents_for_feed.#{locale}.is_hidden"=> -1,
|
index({ "all_contents_for_feed.#{locale}.is_hidden"=> -1,
|
||||||
"all_contents_for_feed.#{locale}.is_top"=> -1,
|
"all_contents_for_feed.#{locale}.is_top"=> -1,
|
||||||
"all_contents_for_feed.#{locale}.postdate"=> -1}, { unique: false, background: true })
|
"all_contents_for_feed.#{locale}.postdate"=> -1}, { unique: false, background: true, name: "cache_#{locale}" })
|
||||||
end
|
end
|
||||||
def get_annc(annc_uid)
|
def get_annc(annc_uid)
|
||||||
Array(self[:all_contents_for_feed]).select{|v| v['id']==annc_uid}[0] rescue {}
|
Array(self[:all_contents_for_feed]).select{|v| v['id']==annc_uid}[0] rescue {}
|
||||||
|
|
Loading…
Reference in New Issue