Fix selectize input defaults

Not pre-filling those with existing associations lead to them being
removed on any update.

Fixes #2988
This commit is contained in:
Henne Vogelsang 2022-05-06 13:19:33 +02:00
parent a7e517ef8a
commit c97d0a1a40
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
2 changed files with 2 additions and 6 deletions

View file

@ -25,7 +25,7 @@
= f.text_field :website_url, class: 'form-control', required: true, placeholder: 'URL'
.form-group
= f.label :responsible_ids, 'Responsibles'
= f.select :responsible_ids, [], {}, { multiple: true, class: 'form-control', id: 'users_selectize', placeholder: 'Responsibles' }
= f.select :responsible_ids, @booth.responsibles.pluck(:username, :id), {}, { multiple: true, class: 'form-control', id: 'users_selectize', placeholder: 'Responsibles' }
%span.help-block
The people responsible for the `t('booth')`. You can only select existing users.
.form-group