From 53db7e80d0876a2ae5e1c3d7f7c1e1eacd398b3c Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 4 Oct 2022 14:39:52 +0200 Subject: [PATCH] AuthenticatedUrlHelper: Fix extraction of parameters * Previously, all parameters were removed --- app/helpers/authenticated_url_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/authenticated_url_helper.rb b/app/helpers/authenticated_url_helper.rb index f77b63fe..3071a4af 100644 --- a/app/helpers/authenticated_url_helper.rb +++ b/app/helpers/authenticated_url_helper.rb @@ -99,7 +99,7 @@ module AuthenticatedUrlHelper # Remove the given parameters from the query string query_params = Rack::Utils.parse_nested_query(parsed_url.query || '') - removed_params = query_params.slice!(parameters) + removed_params = query_params.extract!(*parameters.map(&:to_s)) # Add the query string back to the URL parsed_url.query = URI.encode_www_form(query_params).presence