From 5488b7c561c1ceb74224eec6b260af40be5917bf Mon Sep 17 00:00:00 2001 From: bohung Date: Tue, 23 Aug 2022 21:22:06 +0800 Subject: [PATCH] Fix bug. --- .../app/views/admin/plugin_templates/_form.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template_generator/app/views/admin/plugin_templates/_form.html.erb b/template_generator/app/views/admin/plugin_templates/_form.html.erb index d4d2137..eff9365 100644 --- a/template_generator/app/views/admin/plugin_templates/_form.html.erb +++ b/template_generator/app/views/admin/plugin_templates/_form.html.erb @@ -158,8 +158,8 @@
- <% members = !@plugin_template.member_profile.nil? ? @plugin_template.member_profile.to_a : [] %> - <%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'plugin_template[member_profile_id][]', email_members: members,index:'0',select_name:'member_profile_id'} %> + <% members = !@plugin_template.member_profile_id.nil? ? MemberProfile.where(:id.in=>Array(@plugin_template.member_profile_id)).to_a : [] %> + <%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'plugin_template[member_profile_id][]', email_members: members,index:'0',select_name:'member_profile_id'} %>