fix for no announcement page in widget

This commit is contained in:
Harry Bomrah 2015-02-11 15:52:49 +05:30
parent 4f9e75bc6a
commit 5cfea2946d
1 changed files with 1 additions and 2 deletions

View File

@ -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