restore code

This commit is contained in:
JiangRu 2014-12-27 15:54:43 +08:00
parent d40f8cfc80
commit 7412c2f928
1 changed files with 2 additions and 2 deletions

View File

@ -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