Skip to content

Instantly share code, notes, and snippets.

@palkan
Created April 14, 2017 06:13
  • 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
Save palkan/ef27446f36efe32a6110a76b09d7243a to your computer and use it in GitHub Desktop.
WS Director Examples
class TestChannel < ActionCable::Channel::Base
def subscribed
stream_from "all"
end
def echo(data)
transmit data
end
def broadcast(data)
ActionCable.server.broadcast "all", data
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment