From 7412c2f928b4e913a3f0838054914fe23210775b Mon Sep 17 00:00:00 2001 From: JiangRu Date: Sat, 27 Dec 2014 15:54:43 +0800 Subject: [PATCH] restore code --- app/controllers/announcements_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 2642c62..5bbc1fc 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -1,8 +1,8 @@ class AnnouncementsController < ApplicationController def index - if !OrbitHelper.widget_tags.blank? - announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:postdate=>'desc').filter_by_tags(OrbitHelper.widget_tags).page(OrbitHelper.page_number).per(OrbitHelper.page_data_count) + if !OrbitHelper.params['tags'].blank? + announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:postdate=>'desc').filter_by_tags(OrbitHelper.params['tags']).page(OrbitHelper.page_number).per(OrbitHelper.page_data_count) else announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:postdate=>'desc').filter_by_categories.filter_by_tags end