From 329d3e361b4651ed54b7c389c2529b240862b759 Mon Sep 17 00:00:00 2001 From: Kevin McConnell Date: Thu, 25 Sep 2025 10:16:20 +0100 Subject: [PATCH] Avoid extra slash in cable path When mounting to a `SCRIPT_NAME` of `/`, we were inserting an extra slash in the cable path. --- app/helpers/cable_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/cable_helper.rb b/app/helpers/cable_helper.rb index e715806..663a8ef 100644 --- a/app/helpers/cable_helper.rb +++ b/app/helpers/cable_helper.rb @@ -2,6 +2,6 @@ module CableHelper def script_aware_action_cable_meta_tag tag.meta \ name: "action-cable-url", - content: "#{request.script_name}#{ActionCable.server.config.mount_path}" + content: Pathname(request.script_name) + Pathname(ActionCable.server.config.mount_path) end end