forked from saurabh/personal-book
parent
7f4b994670
commit
ea1be9befa
|
@ -171,8 +171,8 @@ class Book
|
||||||
files = []
|
files = []
|
||||||
self.book_files.each do |book_file|
|
self.book_files.each do |book_file|
|
||||||
url = book_file.member_book_file.url
|
url = book_file.member_book_file.url
|
||||||
title = (book_file.title.blank? ? File.basename(book_file.member_book_file.path) : book_file.title)
|
title = ((book_file.title.blank? ? File.basename(book_file.member_book_file.path) : book_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
|
||||||
|
|
Loading…
Reference in New Issue