From 1bba50e692d9b713f9584c2934f5387d929cf0fe Mon Sep 17 00:00:00 2001 From: chiu Date: Sat, 2 Nov 2019 14:09:29 +0800 Subject: [PATCH] Update journal_papers_helper.rb --- app/helpers/admin/journal_papers_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/admin/journal_papers_helper.rb b/app/helpers/admin/journal_papers_helper.rb index e26ab60..88f7528 100644 --- a/app/helpers/admin/journal_papers_helper.rb +++ b/app/helpers/admin/journal_papers_helper.rb @@ -1,9 +1,9 @@ module Admin::JournalPapersHelper def get_authors_text(journal) - journal.authors.to_s.blank? ? get_member(journal).collect(&:name).join('/') : Nokogiri::HTML(journal.authors.to_s).text + (journal.authors.to_s.blank? ? get_member(journal).collect(&:name).join('/') : Nokogiri::HTML(journal.authors.to_s).text rescue "") end def get_authors_show(journal) - journal.authors.to_s.blank? ? get_member(journal).collect(&:name).join('/') : (journal.authors.to_s) + (journal.authors.to_s.blank? ? get_member(journal).collect{|member| "#{member.name}"}.join('/') : (journal.authors.to_s) rescue "") end def get_member(journal) Array(MemberProfile.find(Array(journal).collect(&:member_profile_id)))