diff --git a/app/controllers/sockets_controller.rb b/app/controllers/sockets_controller.rb index e25472d52de9a5ff4e21aa51c831323acbeafedc..02c28421adf3c6a3a1382e126d9f7a77b276c1be 100644 --- a/app/controllers/sockets_controller.rb +++ b/app/controllers/sockets_controller.rb @@ -8,10 +8,6 @@ class SocketsController < ApplicationController puts "#{msg} connected!" end - def new_subscriber - WebSocket.subscribe - end - def outgoing(object) @_request = ActionDispatch::Request.new({}) WebSocket.push_to_clients(action_hash(object)) diff --git a/config/initializers/socket.rb b/config/initializers/socket.rb index aebf023f3a92e2cb8865f5dc3653b76d51fa8af1..e0019b45284d83ec748f2d826051a53e8a0bd69d 100644 --- a/config/initializers/socket.rb +++ b/config/initializers/socket.rb @@ -32,10 +32,5 @@ module WebSocket @channel.unsubscribe(sid) end - - def self.subscribe - @channel.subscribe{ |msg| ws.send msg } - end - end