diff options
-rw-r--r-- | Gemfile.lock | 7 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | lib/action_cable.rb | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index 4e2ff79c81..578fc63b02 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,17 +1,18 @@ PATH remote: . specs: - action_cable (0.1.0) + actioncable (0.1.0) activesupport (>= 4.2.0) celluloid (~> 0.16.0) em-hiredis (~> 0.3.0) faye-websocket (~> 0.9.2) redis (~> 3.0) + websocket-driver (= 0.5.4) GEM remote: http://rubygems.org/ specs: - activesupport (4.2.2) + activesupport (4.2.3) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) @@ -49,7 +50,7 @@ PLATFORMS ruby DEPENDENCIES - action_cable! + actioncable! puma rake @@ -52,7 +52,7 @@ module ApplicationCable protected def find_verified_user - if current_user = User.find cookies.signed[:user_id] + if current_user = User.find(cookies.signed[:user_id]) current_user else reject_unauthorized_connection diff --git a/lib/action_cable.rb b/lib/action_cable.rb index 5f1f3bec35..fac83cb4c3 100644 --- a/lib/action_cable.rb +++ b/lib/action_cable.rb @@ -28,6 +28,6 @@ module ActionCable # Singleton instance of the server module_function def server - ActionCable::Server::Base.new + @server ||= ActionCable::Server::Base.new end end |