Update journal_papers_helper.rb

This commit is contained in:
chiu 2019-11-02 11:37:36 +08:00
parent 8bd358513e
commit d5ae586a4b
1 changed files with 6 additions and 0 deletions

View File

@ -1,4 +1,10 @@
module Admin::JournalPapersHelper module Admin::JournalPapersHelper
def get_authors_text(journal)
journal.authors.to_s.blank? ? get_member(journal).join('/') : Nokogiri::HTML(journal.authors.to_s).text
end
def get_authors_show(journal)
journal.authors.to_s.blank? ? get_member(journal).join('/') : (journal.authors.to_s)
end
def get_member(journal) def get_member(journal)
Array(MemberProfile.find(Array(journal).collect(&:member_profile_id))) Array(MemberProfile.find(Array(journal).collect(&:member_profile_id)))
end end