From b1b24a3b260be52ba4e78b654fd8c98fd1b2e8ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=B6hm?= Date: Tue, 17 Sep 2024 11:04:48 +0200 Subject: [PATCH] Used helper user_signed_in? insead of current_user --- app/views/jobs/_cancel_button.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/jobs/_cancel_button.html.erb b/app/views/jobs/_cancel_button.html.erb index ccf186e..ff64cf8 100644 --- a/app/views/jobs/_cancel_button.html.erb +++ b/app/views/jobs/_cancel_button.html.erb @@ -1,6 +1,6 @@ <%= turbo_frame_tag dom_id(job, :cancel_button) do %> <%# TODO: Refactor! %> - <% if current_user %> + <% if user_signed_in? %> <% if allowed_to? :cancel?, job %> <%= button_to icon("x-circle", class: "icon size-10 text-hsrm-red", title: "Druckauftrag abbrechen (Anmeldung erforderlich)"), cancel_job_path(job), method: :patch, target: "_top", form: {data: {turbo_frame: "_top", turbo_confirm: 'Den Plottauftrag wirklich abbrechen?'}}, form_class: "inline" %> <% else %>