From c4ae7af68eb278d92db3e77c844d4cc8a4273cc2 Mon Sep 17 00:00:00 2001 From: Bohung Date: Thu, 16 Dec 2021 15:19:12 +0800 Subject: [PATCH] Fix bug. --- app/helpers/admin/personal_books_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/admin/personal_books_helper.rb b/app/helpers/admin/personal_books_helper.rb index a4ded12..7468ce4 100644 --- a/app/helpers/admin/personal_books_helper.rb +++ b/app/helpers/admin/personal_books_helper.rb @@ -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|