diff options
author | Ted Toer <tedtoer@gmail.com> | 2015-07-20 19:49:03 +0500 |
---|---|---|
committer | Ted Toer <tedtoer@gmail.com> | 2015-07-20 19:49:03 +0500 |
commit | 3ac5ed5c23bf628ae504f4b662217f458833d9a6 (patch) | |
tree | a3220665630bd18945728cad63d76f12938493a7 /lib/action_cable | |
parent | 130b8f9ddf321d49f43b730b6677bb25e51d4c32 (diff) | |
download | rails-3ac5ed5c23bf628ae504f4b662217f458833d9a6.tar.gz rails-3ac5ed5c23bf628ae504f4b662217f458833d9a6.tar.bz2 rails-3ac5ed5c23bf628ae504f4b662217f458833d9a6.zip |
disconnect method added to singleton server
Diffstat (limited to 'lib/action_cable')
-rw-r--r-- | lib/action_cable/server/base.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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) |