/notification_channel.coffee Secret
Created
August 19, 2017 12:26
Star
You must be signed in to star a gist
Subscribe to the notification channel via action cable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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