Update journal_paper.rb

fix error
This commit is contained in:
chiu 2019-08-19 15:57:15 +08:00
parent a5a3008a5e
commit a8153e6870
1 changed files with 2 additions and 2 deletions

View File

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