forked from saurabh/personal-journal
parent
a5a3008a5e
commit
a8153e6870
|
@ -210,9 +210,9 @@ class JournalPaper
|
||||||
when "file"
|
when "file"
|
||||||
files = []
|
files = []
|
||||||
self.journal_paper_files.each do |file|
|
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 "")
|
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
|
end
|
||||||
value = files.join("")
|
value = files.join("")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue