Point Action Cable at the slugged cable endpoint
I proposed this upstream in https://github.com/rails/rails/pull/55250, but it's not clear if the presence of script_name should _always_ prefix generated URLs, so for now it's local to Fizzy.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
module TenantingHelper
|
||||
def tenanted_action_cable_meta_tag
|
||||
tag "meta",
|
||||
name: "action-cable-url",
|
||||
content: [ request.script_name, ActionCable.server.config.mount_path ].join("/")
|
||||
end
|
||||
end
|
||||
@@ -15,6 +15,7 @@
|
||||
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
|
||||
<%= javascript_importmap_tags %>
|
||||
|
||||
<%= tenanted_action_cable_meta_tag %>
|
||||
<%= yield :head %>
|
||||
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
|
||||
Reference in New Issue
Block a user