fixed non title rescue
This commit is contained in:
parent
649479b70c
commit
a5b21637a3
|
@ -72,7 +72,6 @@ class AnnouncementsController < ApplicationController
|
||||||
def show
|
def show
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
announcement = Bulletin.can_display.find_by(:uid=>params[:uid])
|
announcement = Bulletin.can_display.find_by(:uid=>params[:uid])
|
||||||
|
|
||||||
url_to_edit = OrbitHelper.user_can_edit?(announcement) ? "/admin/announcements/#{announcement.id.to_s}/edit" : ""
|
url_to_edit = OrbitHelper.user_can_edit?(announcement) ? "/admin/announcements/#{announcement.id.to_s}/edit" : ""
|
||||||
|
|
||||||
access_level = OrbitHelper.user_access_level?
|
access_level = OrbitHelper.user_access_level?
|
||||||
|
@ -85,7 +84,8 @@ class AnnouncementsController < ApplicationController
|
||||||
"tag" => tag.name ,
|
"tag" => tag.name ,
|
||||||
"url" => OrbitHelper.page_for_tag(tag)
|
"url" => OrbitHelper.page_for_tag(tag)
|
||||||
} } rescue []
|
} } rescue []
|
||||||
files = announcement.bulletin_files.map{|file| { "file_url" => file.file.url, "file_title" => (file.title.blank? ? File.basename(file.file.path) : file.title) } } rescue []
|
files = announcement.bulletin_files.map{|file| { "file_url" => file.file.url, "file_title" => (file.title.blank? ? File.basename(file.file.path) : file.title rescue '') } } rescue []
|
||||||
|
|
||||||
links = announcement.bulletin_links.map{|link| { "link_url" => link.url, "link_title" => (link.title.blank? ? link.url : link.title) } } rescue []
|
links = announcement.bulletin_links.map{|link| { "link_url" => link.url, "link_title" => (link.title.blank? ? link.url : link.title) } } rescue []
|
||||||
update_user = announcement.update_user.member_profile.name rescue ""
|
update_user = announcement.update_user.member_profile.name rescue ""
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue