This commit is contained in:
BoHung Chiu 2021-12-16 10:24:39 +08:00
parent 3c474256a2
commit 38e3b5fb77
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ module Admin::PersonalBooksHelper
split_text = split_text.nil? ? '/' : split_text[0]
full_authors_names = get_member(book).collect(&:name)
if authors_text.present?
authors_names = authors_text.split(split_text).select{|a| !(full_authors_names.include?(full_authors_names))}
authors_names = authors_text.split(split_text).select{|a| !(full_authors_names.include?(a.strip()))}
full_authors_names += authors_names
end
full_authors_names.join(split_text)
@ -21,7 +21,7 @@ module Admin::PersonalBooksHelper
"<a href='#{OrbitHelper.url_to_plugin_show(member.to_param,'member')}' title='#{member_name}'>#{member_name}</a>"
}
if authors_text.present?
authors_names = authors_text.split(split_text).select{|a| !(full_authors_names.include?(full_authors_names.strip()))}
authors_names = authors_text.split(split_text).select{|a| !(full_authors_names.include?(a.strip()))}
full_authors += authors_names
end
full_authors.join(split_text)