diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2015-07-20 17:15:49 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2015-07-20 17:15:49 +0200 |
commit | 84bd21b59122448d688a9ac236f116afadffa4f9 (patch) | |
tree | a3220665630bd18945728cad63d76f12938493a7 | |
parent | 130b8f9ddf321d49f43b730b6677bb25e51d4c32 (diff) | |
parent | 3ac5ed5c23bf628ae504f4b662217f458833d9a6 (diff) | |
download | rails-84bd21b59122448d688a9ac236f116afadffa4f9.tar.gz rails-84bd21b59122448d688a9ac236f116afadffa4f9.tar.bz2 rails-84bd21b59122448d688a9ac236f116afadffa4f9.zip |
Merge pull request #33 from tedtoer/add-disconnect-to-server
disconnect method added to singleton server
-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) |