From f0efa2344ae59f90565ae19eca81167e5ccfde8c Mon Sep 17 00:00:00 2001 From: JiangRu Date: Thu, 27 Nov 2014 11:22:45 +0800 Subject: [PATCH] fix announcement title language --- 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 56225bc..2a398cd 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -1,7 +1,7 @@ class AnnouncementsController < ApplicationController def index - announcements = Bulletin.where(:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:created_at=>'desc').filter_by_categories.filter_by_tags(OrbitHelper.params['tags']) + announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:created_at=>'desc').filter_by_categories.filter_by_tags(OrbitHelper.params['tags']) anns = announcements.collect do |a| statuses = a.statuses_with_classname.collect do |status| @@ -42,7 +42,7 @@ class AnnouncementsController < ApplicationController end def widget - announcements = Bulletin.where(:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:created_at=>'desc').filter_by_widget_categories.filter_by_tags(OrbitHelper.widget_tags) + announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:created_at=>'desc').filter_by_widget_categories.filter_by_tags(OrbitHelper.widget_tags) anns = announcements.collect do |a| statuses = a.statuses_with_classname.collect do |status|