diff --git a/app/helpers/admin/journal_papers_helper.rb b/app/helpers/admin/journal_papers_helper.rb index e8f52c4..75803d2 100644 --- a/app/helpers/admin/journal_papers_helper.rb +++ b/app/helpers/admin/journal_papers_helper.rb @@ -10,7 +10,7 @@ module Admin::JournalPapersHelper end full_authors_names = get_member(journal).collect do |member| member_name = member.name - idx = authors_names.index{|a| a.chomp('*') == member_name} + idx = authors_names.index{|a| a.match(/(^|[ \(\[])#{member_name}([ \)\]\*]|$)/)} if idx member_name = authors_names[idx] authors_names[idx] = nil @@ -31,7 +31,7 @@ module Admin::JournalPapersHelper end full_authors = get_member(journal).collect do |member| member_name = member.name - idx = authors_names.index{|a| a.chomp('*') == member_name} + idx = authors_names.index{|a| a.match(/(^|[ \(\[])#{member_name}([ \)\]\*]|$)/)} if idx member_name = authors_names[idx] authors_names[idx] = nil