From 3ac5ed5c23bf628ae504f4b662217f458833d9a6 Mon Sep 17 00:00:00 2001 From: Ted Toer Date: Mon, 20 Jul 2015 19:49:03 +0500 Subject: disconnect method added to singleton server --- lib/action_cable/server/base.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/action_cable/server/base.rb') diff --git a/lib/action_cable/server/base.rb b/lib/action_cable/server/base.rb index 23cd8388bd..8d64afa1d9 100644 --- a/lib/action_cable/server/base.rb +++ b/lib/action_cable/server/base.rb @@ -21,6 +21,11 @@ module ActionCable config.connection_class.new(self, env).process end + # Disconnect all the remote connections established for subject, finded by identifiers + def disconnect(identifiers) + remote_connections.where(identifiers).disconnect + end + # Gateway to RemoteConnections. See that class for details. def remote_connections @remote_connections ||= RemoteConnections.new(self) -- cgit v1.2.3