Update patent.rb

fix error
This commit is contained in:
chiu 2019-08-19 16:52:22 +08:00
parent 00103841c3
commit dc1e3a6d0a
1 changed files with 2 additions and 2 deletions

View File

@ -132,8 +132,8 @@ class Patent
files = [] files = []
self.patent_files.each do |patent_file| self.patent_files.each do |patent_file|
url = patent_file.file.url url = patent_file.file.url
title = (patent_file.title.blank? ? File.basename(patent_file.file.path) : patent_file.title) title = ((patent_file.title.blank? ? File.basename(patent_file.file.path) : patent_file.title) rescue "")
files << "<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