This commit is contained in:
BoHung Chiu 2021-12-16 15:19:12 +08:00
parent 017c357179
commit c4ae7af68e
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
module Admin::PersonalBooksHelper
def get_authors_text(book)
authors_text = Nokogiri::HTML(book.authors.to_s).text
split_text = authors_text.match(/[、,\/]/)
split_text = authors_text.match(/[、,\/]/)
split_text = split_text.nil? ? '/' : split_text[0]
full_authors_names = get_member(book).collect(&:name)
if authors_text.present?
@ -12,7 +12,7 @@ module Admin::PersonalBooksHelper
end
def get_authors_show(book)
authors_text = Nokogiri::HTML(book.authors.to_s).text
split_text = authors_text.match(/[、,\/]/)
split_text = authors_text.match(/[、,\/]/)
split_text = split_text.nil? ? '/' : split_text[0]
full_authors_names = []
full_authors = get_member(book).collect{|member|