Skip to content

Commit 27a983a

Browse files
committed
Show only chapter organisers on workshop edit page
Previously, we were fetching and making it selectable all of the existing members, which actually slowed down the whole page.
1 parent 96abdef commit 27a983a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/admin/workshops/_edit_form.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.col-12.col-md-6
66
= render partial: 'virtual_workshop_fields', locals: { f: f }
77
.col-12.col-md-6
8-
= f.input :organisers, collection: Member.all, value_method: :id, label_method: :full_name, selected: @workshop.organisers.map(&:id), input_html: { multiple: true }
8+
= f.input :organisers, collection: @workshop.chapter.organisers, value_method: :id, label_method: :full_name, selected: @workshop.organisers.pluck(&:id), input_html: { multiple: true }
99
.col-12
1010
= f.input :invitable, hint_html: { class: 'd-block ms-1' }
1111
.row

0 commit comments

Comments
 (0)