forked from saurabh/personal-book
parent
7f4b994670
commit
ea1be9befa
|
@ -171,8 +171,8 @@ class Book
|
|||
files = []
|
||||
self.book_files.each do |book_file|
|
||||
url = book_file.member_book_file.url
|
||||
title = (book_file.title.blank? ? File.basename(book_file.member_book_file.path) : book_file.title)
|
||||
files << "<li><a href='#{url}'' target='_blank'>#{title}</li>"
|
||||
title = ((book_file.title.blank? ? File.basename(book_file.member_book_file.path) : book_file.title) rescue "")
|
||||
files << (url.nil? ? "" : "<li><a href='#{url}'' target='_blank'>#{title}</li>")
|
||||
end
|
||||
value = files.join("")
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue