Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@anka
Created August 19, 2017 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anka/3c84acb8b69248fc56a3138eb047fe2c to your computer and use it in GitHub Desktop.
Save anka/3c84acb8b69248fc56a3138eb047fe2c to your computer and use it in GitHub Desktop.
Post message to action cable channel
# Your processing code goes here
# Collect message data
message_data = { ... }
# Post a message to the channel
ActionCable.server.broadcast "notification_channel_#{some_param}", data: message_data
# Further code goes here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment