From 08059e21526bdb83c1736bb58acd70934753e5ac Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 23 Nov 2016 19:03:34 +0800 Subject: [PATCH] small fix for title empty --- app/controllers/announcements_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 443eea5..96f925e 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -133,8 +133,8 @@ class AnnouncementsController < ApplicationController x = { "bulletin_links" => links, "bulletin_files" => files, - "title" => (fa["title_translations"][locale] rescue ""), - "subtitle" => (fa["subtitle_translations"][locale] rescue ""), + "title" => fa["title_translations"][locale], + "subtitle" => fa["subtitle_translations"][locale], "statuses" => [status], "category" => fa["category"], "postdate" => fa["postdate"], @@ -149,7 +149,7 @@ class AnnouncementsController < ApplicationController "more" => t(:more_plus), "view_count" => "" } - if !x["title"].empty? + if (!x["title"].empty? rescue false) fans << x end end