fix for widget filter by tag

This commit is contained in:
Harry Bomrah 2016-04-21 15:53:58 +08:00
parent fb7ed0bb69
commit daa42b0ce2
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ class AnnouncementsController < ApplicationController
uid = OrbitHelper.params[:uid] rescue ""
tags = OrbitHelper.widget_tags
announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil],:uid.ne => uid).and(:title.ne => nil, :is_top.ne => true).can_display.is_approved.filter_by_widget_categories([],false).filter_by_tags(tags).to_a
top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true, :uid.ne => uid).and(:title.ne => nil).can_display.filter_by_widget_categories([],false).to_a
top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true, :uid.ne => uid).and(:title.ne => nil).can_display.filter_by_widget_categories([],false).filter_by_tags(tags).to_a
pack_data(announcements, top_anns)
end