From 8a39e73dfd015255e58d78dc4c31b05e1d206103 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 13 Nov 2019 13:30:39 +0800 Subject: [PATCH] Update personal_conferences_helper.rb add get_member_show method --- app/helpers/admin/personal_conferences_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/helpers/admin/personal_conferences_helper.rb b/app/helpers/admin/personal_conferences_helper.rb index a0518e6..52ce5b6 100644 --- a/app/helpers/admin/personal_conferences_helper.rb +++ b/app/helpers/admin/personal_conferences_helper.rb @@ -3,11 +3,14 @@ module Admin::PersonalConferencesHelper (writing_conference.authors.to_s.blank? ? get_member(writing_conference).collect(&:name).join('/') : Nokogiri::HTML(writing_conference.authors.to_s).text rescue '') end def get_authors_show(writing_conference) - (writing_conference.authors.to_s.blank? ? get_member(writing_conference).collect{|member| "#{member.name}"}.join('/') : writing_conference.authors.to_s rescue '') + (writing_conference.authors.to_s.blank? ? get_member_show(writing_conference) : writing_conference.authors.to_s rescue '') end def get_member(writing_conference) Array(MemberProfile.find(Array(writing_conference).collect(&:member_profile_id))) end + def get_member_show(writing_conference) + get_member(writing_conference).collect{|member| "#{member.name}"}.join('/') + end def get_sponsor(writing_conference) writing_conference.sponsor end