diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 70f0518..6b8fb50 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -19,7 +19,11 @@ class AnnouncementsController < ApplicationController end if (OrbitHelper.page_number == 1 or OrbitHelper.page_number.nil?) && !params["source"].present? - top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true).and(:title.ne => nil).can_display.filter_by_categories([],false).to_a + if !params['tags'].blank? + top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true).and(:title.ne => nil).can_display.filter_by_categories([],false).filter_by_tags(params['tags']).to_a + else + top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true).and(:title.ne => nil).can_display.filter_by_categories([],false).filter_by_tags.to_a + end end if !feeds_anns.blank?