Update journal_paper.rb

This commit is contained in:
chiu 2019-11-02 13:53:33 +08:00
parent 983da75c5b
commit 78f7eafcff
1 changed files with 2 additions and 0 deletions

View File

@ -215,6 +215,8 @@ class JournalPaper
files << (url.nil? ? "" : "<li><a href='#{url}'' target='_blank'>#{title}</li>")
end
value = files.join("")
when "url"
value = self.url.to_s.blank? ? "" : "<a href='#{self.url}'>#{self.url}</a>"
else
value = self.send(field) rescue ""
end