From 5cfea2946d5328de999c61817cb61db19961f3fb Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 11 Feb 2015 15:52:49 +0530 Subject: [PATCH] fix for no announcement page in widget --- app/controllers/announcements_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 631c2c0..dda0cc7 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -54,7 +54,6 @@ class AnnouncementsController < ApplicationController def widget announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:postdate=>'desc').filter_by_widget_categories.filter_by_tags(OrbitHelper.widget_tags) page = Page.where(:module => "announcement").first rescue nil - anns = announcements.collect do |a| statuses = a.statuses_with_classname.collect do |status| { @@ -95,7 +94,7 @@ class AnnouncementsController < ApplicationController "category-head" => t('announcement.table.category'), "link-head" => t('announcement.table.link'), "file-head" => t('announcement.table.file'), - "read_more" => "/#{I18n.locale.to_s + page.url}" + "read_more" => ("/#{I18n.locale.to_s + page.url}" rescue "") } } end