Update writing_conference.rb

fix error
This commit is contained in:
chiu 2019-08-19 16:48:36 +08:00
parent f1fa503b8b
commit 67e928b4e9
1 changed files with 2 additions and 2 deletions

View File

@ -192,8 +192,8 @@ class WritingConference
files = []
self.writing_conference_files.each do |conference_files|
url = conference_files.file.url
title = (conference_files.title.blank? ? File.basename(conference_files.file.path) : conference_files.title)
files << "<li><a href='#{url}'' target='_blank'>#{title}</li>"
title = ((conference_files.title.blank? ? File.basename(conference_files.file.path) : conference_files.title) rescue "")
files << (url.nil? ? "" : "<li><a href='#{url}'' target='_blank'>#{title}</li>")
end
value = files.join("")
else