|
1 | 1 | :ruby |
| 2 | + all_sponsors = Sponsor.all |
2 | 3 | all_managers = Member.manager.sort_alphabetically |
3 | 4 |
|
4 | 5 | = simple_form_for [:admin, @event] do |f| |
|
37 | 38 | %p |
38 | 39 | %strong Please add sponsors only to either Standard level OR Gold/Silver/Bronze levels. |
39 | 40 | .col-12 |
40 | | - = f.association :sponsors, label: 'Standard sponsors', input_html: { data: { placeholder: 'Select standard sponsors' }}, collection: Sponsor.all |
| 41 | + = f.association :sponsors, label: 'Standard sponsors', input_html: { data: { placeholder: 'Select standard sponsors' }}, collection: all_sponsors |
41 | 42 | .col-12.col-md-6.col-lg-4 |
42 | | - = f.association :bronze_sponsors, input_html: { data: { placeholder: 'Select bronze sponsors' }}, collection: Sponsor.all |
| 43 | + = f.association :bronze_sponsors, input_html: { data: { placeholder: 'Select bronze sponsors' }}, collection: all_sponsors |
43 | 44 | .col-12.col-md-6.col-lg-4 |
44 | | - = f.association :silver_sponsors, input_html: { data: { placeholder: 'Select silver sponsors' }}, collection: Sponsor.all |
| 45 | + = f.association :silver_sponsors, input_html: { data: { placeholder: 'Select silver sponsors' }}, collection: all_sponsors |
45 | 46 | .col-12.col-md-6.col-lg-4 |
46 | | - = f.association :gold_sponsors, input_html: { data: { placeholder: 'Select gold sponsors' }}, collection: Sponsor.all |
| 47 | + = f.association :gold_sponsors, input_html: { data: { placeholder: 'Select gold sponsors' }}, collection: all_sponsors |
47 | 48 | .col-12 |
48 | 49 | = f.input :organisers, collection: all_managers, value_method: :id, label_method: :full_name, selected: @event.organisers.pluck(&:id), input_html: { multiple: true } |
49 | 50 | .col-12 |
|
0 commit comments