Create a gist now

Instantly share code, notes, and snippets.

@palkan /test_channel.rb Secret
Created Apr 14, 2017

What would you like to do?
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