From 8194b79d0a7ffccafc7c7d0de3ba0d0d4341035a Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Thu, 1 Oct 2015 18:22:27 +0800 Subject: [PATCH] sort top fix --- app/controllers/announcements_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 0e9a5d7..54798ea 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -92,7 +92,7 @@ class AnnouncementsController < ApplicationController def widget uid = OrbitHelper.params[:uid] rescue "" tags = ["all"] if OrbitHelper.widget_tags.empty? - announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil],:uid.ne => uid).and(:title.ne => nil).can_display.is_approved.order_by(:postdate=>'desc').filter_by_widget_categories.filter_by_tags(tags) + announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil],:uid.ne => uid).and(:title.ne => nil).is_approved.order_by(:postdate=>'desc').can_display.filter_by_widget_categories.filter_by_tags(tags) page = Page.where(:module => "announcement").first rescue nil anns = announcements.collect do |a| statuses = a.statuses_with_classname.collect do |status|