From 7c3f590b6b1c02724cac3125e8e2df26f16c4b0b Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 12 Sep 2016 14:11:21 +0800 Subject: [PATCH] small fix for top bulletins if not approved --- 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 4342852..640713f 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -170,7 +170,7 @@ class AnnouncementsController < ApplicationController uid = OrbitHelper.params[:uid] rescue "" tags = OrbitHelper.widget_tags announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil],:uid.ne => uid).and(:title.ne => nil, :is_top.ne => true).can_display.is_approved.filter_by_widget_categories([],false).filter_by_tags(tags).to_a - top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true, :uid.ne => uid).and(:title.ne => nil).can_display.filter_by_widget_categories([],false).filter_by_tags(tags).to_a + top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true, :uid.ne => uid).and(:title.ne => nil).can_display.is_approved.filter_by_widget_categories([],false).filter_by_tags(tags).to_a pack_data(announcements, top_anns) end