From a8153e68705d39802291cf8383fbe372a7aeac89 Mon Sep 17 00:00:00 2001 From: chiu Date: Mon, 19 Aug 2019 15:57:15 +0800 Subject: [PATCH] Update journal_paper.rb fix error --- app/models/journal_paper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/journal_paper.rb b/app/models/journal_paper.rb index a19aeb1..8ff8da1 100644 --- a/app/models/journal_paper.rb +++ b/app/models/journal_paper.rb @@ -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=="" ? "" : "
  • #{title}
  • ") + files << (url.nil? ? "" : "
  • #{title}
  • ") end value = files.join("") else