Use helpers instead of URLs in switch checkboxes

Absolute URLs may be potentially breaking functionality, eg in case of
sub-directory installation.

Fixes https://github.com/openSUSE/osem/issues/2472

Co-authored-by: Ana María Martínez Gómez <anamaria@martinezgomez.name>
This commit is contained in:
Stella Rouzi 2019-03-30 21:57:45 +02:00 committed by Ana María Martínez Gómez
parent f64cd7323f
commit b590bc4145
No known key found for this signature in database
GPG key ID: EACB9B4BC80C0347
3 changed files with 5 additions and 5 deletions

View file

@ -32,7 +32,7 @@
%td= event_registration.email
%td= event_registration.created_at
%td
= check_box_tag @conference.short_title, @event.id, event_registration.attended, class: 'switch-checkbox', url: "/admin/conferences/#{@conference.short_title}/program/events/#{@event.id}/toggle_attendance?events_registration_id=#{event_registration.id}&&event_registration[attended]="
= check_box_tag @conference.short_title, @event.id, event_registration.attended, class: 'switch-checkbox', url: "#{toggle_attendance_admin_conference_program_event_path(@conference, @event, events_registration_id: event_registration)}&&event_registration[attended]="
%td
- if event_registration.registration.attended
%i.fa.fa-check.text-success