From 5a49d48e3c2e65e1f102f315f748ffa749af00f7 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Thu, 8 Oct 2015 16:59:05 +0800 Subject: [PATCH] order of announcment fixed --- 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 8c59c69..b3f394d 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -4,9 +4,9 @@ class AnnouncementsController < ApplicationController params = OrbitHelper.params feeds_anns = [] if !params['tags'].blank? - announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).and(:title.ne => nil).can_display.is_approved.order_by(:postdate=>'desc').filter_by_tags(params['tags']).page(OrbitHelper.page_number).per(OrbitHelper.page_data_count) + announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).and(:title.ne => nil).can_display.is_approved.filter_by_tags(params['tags']).page(OrbitHelper.page_number).per(OrbitHelper.page_data_count) else - announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).and(:title.ne => nil).can_display.is_approved.order_by(:postdate=>'desc').filter_by_categories.filter_by_tags + announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).and(:title.ne => nil).can_display.is_approved.filter_by_categories.filter_by_tags feeds_anns = get_feed_announcements("index") end