From 26f89a22a0a0d9880c22f925f84a3b38dc52aa19 Mon Sep 17 00:00:00 2001 From: Kat Date: Thu, 27 Apr 2023 12:01:43 +0100 Subject: [PATCH] refactor string parse --- app/controllers/form_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/form_controller.rb b/app/controllers/form_controller.rb index 59c451b0a..687ff163a 100644 --- a/app/controllers/form_controller.rb +++ b/app/controllers/form_controller.rb @@ -47,7 +47,7 @@ class FormController < ApplicationController def show_page if request.params["referrer"] == "interruption_screen" - @interruption_page_id = request.headers["HTTP_REFERER"].split("/")[-1].split("?")[0].underscore + @interruption_page_id = URI.parse(request.headers["HTTP_REFERER"]).path.split("/").last.underscore end if @log