Skip to content

Instantly share code, notes, and snippets.

@anka
Created August 19, 2017 12:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Subscribe to the notification channel via action cable
App.quote_generation = App.cable.subscriptions.create channel: "NotificationChannel", param1: value1,
connected: ->
# Called when the subscription is ready for use on the server
disconnected: ->
# Called when the subscription has been terminated by the server
received: (data) ->
# Called when there's incoming data on the websocket for this channel
# Add your code here to e.g. update some UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment