Files
once-campfire/app/helpers/cable_helper.rb
Kevin McConnell 329d3e361b Avoid extra slash in cable path
When mounting to a `SCRIPT_NAME` of `/`, we were inserting an extra
slash in the cable path.
2025-09-25 10:47:11 +01:00

8 lines
211 B
Ruby

module CableHelper
def script_aware_action_cable_meta_tag
tag.meta \
name: "action-cable-url",
content: Pathname(request.script_name) + Pathname(ActionCable.server.config.mount_path)
end
end