Skip to content

Commit 4913525

Browse files
authored
Merge pull request rails#42081 from jharrilim/patch-1
Docs - ActionCable Overview - Syntax Error
2 parents 2afb94a + dcff2f2 commit 4913525

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/source/action_cable_overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@ WebSocket is opened.
266266
createConsumer('https://ws.example.com/cable')
267267

268268
// Use a function to dynamically generate the URL
269-
createConsumer(getWebSocketURL)
269+
createConsumer(getWebSocketURL())
270270

271-
function getWebSocketURL {
271+
function getWebSocketURL() {
272272
const token = localStorage.get('auth-token')
273273
return `https://ws.example.com/cable?token=${token}`
274274
}

0 commit comments

Comments
 (0)