Fix show method display file tile and link title
This commit is contained in:
parent
b5962ea4bf
commit
b976c9efd8
|
@ -58,8 +58,8 @@ class AnnouncementsController < ApplicationController
|
|||
announcement = Bulletin.can_display.find_by(:uid=>params[:uid])
|
||||
|
||||
tags = announcement.tags.map{|tag| { "tag" => tag.name } } rescue []
|
||||
files = announcement.bulletin_files.map{|file| { "file_url" => file.file.url, "file_title" => file.title } } rescue []
|
||||
links = announcement.bulletin_links.map{|link| { "link_url" => link.url, "link_title" => link.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 []
|
||||
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 ""
|
||||
{
|
||||
"tags" => tags,
|
||||
|
|
Loading…
Reference in New Issue